Replace extendProperties with pathtools.AppendProperties
Blueprint has a generic AppendProperties/AppendMatchingProperties now,
use it, and replace all bool properties that might be modified by a
mutator with *bool, which provides the correct replace-if-set semantics
for append.
Also remove uses of ContainsProperty except when explicitly checking if
a property was set in a blueprints file.
Change-Id: If523af61d6b4630e79504d7fc2840f36e98571cc
diff --git a/common/module.go b/common/module.go
index feaba83..d31a9fc 100644
--- a/common/module.go
+++ b/common/module.go
@@ -123,7 +123,6 @@
base := m.base()
base.module = m
- base.extendedProperties = make(map[string]struct{})
propertyStructs = append(propertyStructs, &base.commonProperties, &base.variableProperties)
@@ -198,7 +197,6 @@
hostAndDeviceProperties hostAndDeviceProperties
generalProperties []interface{}
archProperties []*archProperties
- extendedProperties map[string]struct{}
noAddressSanitizer bool
installFiles []string
@@ -340,9 +338,8 @@
hod: a.commonProperties.CompileHostOrDevice,
config: ctx.Config().(Config),
},
- installDeps: a.computeInstallDeps(ctx),
- installFiles: a.installFiles,
- extendedProperties: a.extendedProperties,
+ installDeps: a.computeInstallDeps(ctx),
+ installFiles: a.installFiles,
}
if a.commonProperties.Disabled {
@@ -373,10 +370,9 @@
type androidModuleContext struct {
blueprint.ModuleContext
androidBaseContextImpl
- installDeps []string
- installFiles []string
- checkbuildFiles []string
- extendedProperties map[string]struct{}
+ installDeps []string
+ installFiles []string
+ checkbuildFiles []string
}
func (a *androidModuleContext) Build(pctx *blueprint.PackageContext, params blueprint.BuildParams) {
@@ -384,14 +380,6 @@
a.ModuleContext.Build(pctx, params)
}
-func (a *androidModuleContext) ContainsProperty(property string) bool {
- if a.ModuleContext.ContainsProperty(property) {
- return true
- }
- _, ok := a.extendedProperties[property]
- return ok
-}
-
func (a *androidBaseContextImpl) Arch() Arch {
return a.arch
}