Wrap PackageContext and SingletonContext
Wrap blueprint.PackageContext so that the *Func methods can provide
an android.Config instead of an interface{}. The modified signatures
means that every method in ModuleContext and SingletonContext
that takes a blueprint.PackageContext now needs to be wrapped to
take an android.PackageContext.
SingletonContext wasn't previously wrapped at all, but as long
as it is, wrap everything like ModuleContext does. This requires
updating every Singleton to use the android-specific methods.
Test: builds, all Soong tests pass
Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
diff --git a/cc/library.go b/cc/library.go
index 192496a..cf10617 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -85,9 +85,6 @@
VariantIsShared bool `blueprint:"mutated"`
// This variant is static
VariantIsStatic bool `blueprint:"mutated"`
- // Location of the static library in the sysroot. Empty if the library is
- // not included in the NDK.
- NdkSysrootPath string `blueprint:"mutated"`
}
type FlagExporterProperties struct {
@@ -246,6 +243,10 @@
// Source Abi Diff
sAbiDiff android.OptionalPath
+ // Location of the static library in the sysroot. Empty if the library is
+ // not included in the NDK.
+ ndkSysrootPath android.Path
+
// Decorated interafaces
*baseCompiler
*baseLinker
@@ -742,7 +743,7 @@
Input: file,
})
- library.MutatedProperties.NdkSysrootPath = installPath.String()
+ library.ndkSysrootPath = installPath
}
}