Add support for defaults modules

Add a cc_defaults module, which will prepend any matching properties to
modules that reference it with a "defaults" property.

Change-Id: I5908dd98d204f71b29ad95a4ab85403aa1621ca2
This commit is contained in:
Colin Cross
2015-11-02 16:43:11 -08:00
parent 6362e27848
commit cfad119eaf
5 changed files with 176 additions and 13 deletions

View File

@@ -127,6 +127,7 @@ func InitAndroidArchModule(m AndroidModule, hod HostOrDeviceSupported, defaultMu
base := m.base()
base.commonProperties.HostOrDeviceSupported = hod
base.commonProperties.Compile_multilib = string(defaultMultilib)
if hod == HostAndDeviceSupported {
// Default to module to device supported, host not supported, can override in module
@@ -135,7 +136,7 @@ func InitAndroidArchModule(m AndroidModule, hod HostOrDeviceSupported, defaultMu
propertyStructs = append(propertyStructs, &base.hostAndDeviceProperties)
}
return InitArchModule(m, defaultMultilib, propertyStructs...)
return InitArchModule(m, propertyStructs...)
}
// A AndroidModuleBase object contains the properties that are common to all Android