Extend ALLOW_MISSING_DEPENDENCIES coverage

Make build system respect ALLOW_MISSING_DEPENDENCIES, when building
architecture B products, and ignore targets with dependencies that
are not available for architecture B.

Bug: 142701187
Test: # Add a dummy Android.bp with a module only for arm64
      $ m -j TARGET_PRODUCT=aosp_x86 TARGET_BUILD_VARIANT=userdebug

Change-Id: I64de33674732df8c286671c806a07bcd19862b80
This commit is contained in:
Isaac Chen 2019-10-15 17:16:05 +08:00
parent a60e81853f
commit 2c0a180be0
1 changed files with 5 additions and 1 deletions

View File

@ -1925,7 +1925,11 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
if ptr != nil {
if !linkFile.Valid() {
if !ctx.Config().AllowMissingDependencies() {
ctx.ModuleErrorf("module %q missing output file", depName)
} else {
ctx.AddMissingDependencies([]string{depName})
}
return
}
*ptr = append(*ptr, linkFile.Path())