Fix ALLOW_MISSING_DEPENDENCIES builds for prebuilt JNI libraries

Check for ALLOW_MISSING_DEPENDENCIES before reporting an error
with a prebuilt JNI library missing the required architecture.

Bug: 263138197
Test: lunch aosp_riscv64-userdebug && m
Change-Id: Ifa02c3c690cca1bf7b2b62cf9888f80d96073d71
This commit is contained in:
Colin Cross
2022-12-19 12:26:43 -08:00
parent 95f18bd6c5
commit dd5261c8d8

View File

@@ -800,6 +800,8 @@ func collectAppDeps(ctx android.ModuleContext, app appDepsInterface,
unstrippedFile: dep.UnstrippedOutputFile(),
partition: dep.Partition(),
})
} else if ctx.Config().AllowMissingDependencies() {
ctx.AddMissingDependencies([]string{otherName})
} else {
ctx.ModuleErrorf("dependency %q missing output file", otherName)
}