Make MakeVarsContext a PathContext
Expose all of SingletonContext to makeVarsContext, and then export
the subset of it that is used through MakeVarsContext.SingletonContext,
plus what is necessary for PathContext, directly through
MakeVarsContext.
Test: m checkbuild
Change-Id: Ie00f36e577fe110b6fa03b901da489d8547773c6
diff --git a/android/singleton.go b/android/singleton.go
index f926435..05ec6b5 100644
--- a/android/singleton.go
+++ b/android/singleton.go
@@ -22,6 +22,7 @@
// SingletonContext
type SingletonContext interface {
Config() Config
+ DeviceConfig() DeviceConfig
ModuleName(module blueprint.Module) string
ModuleDir(module blueprint.Module) string
@@ -93,6 +94,10 @@
return s.SingletonContext.Config().(Config)
}
+func (s singletonContextAdaptor) DeviceConfig() DeviceConfig {
+ return DeviceConfig{s.Config().deviceConfig}
+}
+
func (s singletonContextAdaptor) Variable(pctx PackageContext, name, value string) {
s.SingletonContext.Variable(pctx.PackageContext, name, value)
}