Remove customizableProperties from `android.ModuleBase`
- customizableProperties was being used to access all properties,
i.e. basically `GetProperties()`
- generalProperties was a subset of properties,
i.e. `initArchModule()` would only add new arch-specific properties
to `customizableProperties` (and `archProperties`) but not `generalProperties`
This PR sets generalProperties to contain all properties,
which then makes customizableProperties redundant.
And in arch.go, any iteration is done via `archProperties` instead.
Bug: 206961391
Test: m nothing and diff the ninja files
Change-Id: Ieb72b31c0a447fcbf34c92a04f002d7b9d777a86
diff --git a/android/arch.go b/android/arch.go
index e08fd5c..fb33f30 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -1036,9 +1036,7 @@
m.AddProperties(archProperties...)
}
- // Update the list of properties that can be set by a defaults module or a call to
- // AppendMatchingProperties or PrependMatchingProperties.
- base.customizableProperties = m.GetProperties()
+ base.generalProperties = m.GetProperties()
}
func maybeBlueprintEmbed(src reflect.Value) reflect.Value {
@@ -1111,7 +1109,7 @@
func (m *ModuleBase) setOSProperties(ctx BottomUpMutatorContext) {
os := m.commonProperties.CompileOS
- for i := range m.generalProperties {
+ for i := range m.archProperties {
genProps := m.generalProperties[i]
if m.archProperties[i] == nil {
continue
@@ -1439,7 +1437,7 @@
arch := m.Arch()
os := m.Os()
- for i := range m.generalProperties {
+ for i := range m.archProperties {
genProps := m.generalProperties[i]
if m.archProperties[i] == nil {
continue