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
diff --git a/java/app.go b/java/app.go
index a822cbf..68f5a68 100755
--- a/java/app.go
+++ b/java/app.go
@@ -800,6 +800,8 @@
unstrippedFile: dep.UnstrippedOutputFile(),
partition: dep.Partition(),
})
+ } else if ctx.Config().AllowMissingDependencies() {
+ ctx.AddMissingDependencies([]string{otherName})
} else {
ctx.ModuleErrorf("dependency %q missing output file", otherName)
}