Merge "apex_available is defaultable"
This commit is contained in:
@@ -151,7 +151,8 @@ func InitDefaultsModule(module DefaultsModule) {
|
|||||||
module.AddProperties(
|
module.AddProperties(
|
||||||
&hostAndDeviceProperties{},
|
&hostAndDeviceProperties{},
|
||||||
commonProperties,
|
commonProperties,
|
||||||
&variableProperties{})
|
&variableProperties{},
|
||||||
|
&ApexProperties{})
|
||||||
|
|
||||||
InitArchModule(module)
|
InitArchModule(module)
|
||||||
InitDefaultableModule(module)
|
InitDefaultableModule(module)
|
||||||
|
@@ -1157,12 +1157,12 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// check apex_available requirements
|
// check apex_available requirements
|
||||||
if !ctx.Host() {
|
if !ctx.Host() && !a.testApex {
|
||||||
for _, fi := range filesInfo {
|
for _, fi := range filesInfo {
|
||||||
if am, ok := fi.module.(android.ApexModule); ok {
|
if am, ok := fi.module.(android.ApexModule); ok {
|
||||||
if !am.AvailableFor(ctx.ModuleName()) {
|
if !am.AvailableFor(ctx.ModuleName()) {
|
||||||
ctx.ModuleErrorf("requires %q that is not available for the APEX", fi.module.Name())
|
ctx.ModuleErrorf("requires %q that is not available for the APEX", fi.module.Name())
|
||||||
return
|
// don't stop so that we can report other violations in the same run
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
cc/cc.go
1
cc/cc.go
@@ -2459,7 +2459,6 @@ func DefaultsFactory(props ...interface{}) android.Module {
|
|||||||
&PgoProperties{},
|
&PgoProperties{},
|
||||||
&XomProperties{},
|
&XomProperties{},
|
||||||
&android.ProtoProperties{},
|
&android.ProtoProperties{},
|
||||||
&android.ApexProperties{},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
android.InitDefaultsModule(module)
|
android.InitDefaultsModule(module)
|
||||||
|
Reference in New Issue
Block a user