Ignore disabled modules when generating ndk sysroot
When linux_bionic is turned on, there are two host modules for the preprocessed ndk headers, but only one is enabled. So exit early for the disabled one. Bug: 31559095 Test: Diff out/soong/build.ninja before/after, no change. Test: Turn on linux_bionic, no longer see a panic. Change-Id: I204a884a83ccf21c96088e97c19a0cffe029ec99
This commit is contained in:
@@ -90,6 +90,10 @@ func (n *ndkSingleton) GenerateBuildActions(ctx blueprint.SingletonContext) {
|
||||
installPaths := []string{}
|
||||
licensePaths := []string{}
|
||||
ctx.VisitAllModules(func(module blueprint.Module) {
|
||||
if m, ok := module.(android.Module); ok && !m.Enabled() {
|
||||
return
|
||||
}
|
||||
|
||||
if m, ok := module.(*headerModule); ok {
|
||||
installPaths = append(installPaths, m.installPaths...)
|
||||
licensePaths = append(licensePaths, m.licensePath.String())
|
||||
|
Reference in New Issue
Block a user