Don't package host cross modules in javaFuzzPackager
Normally the host cross OS is windows, which only builds a few opted-in
modules. When the host cross OS is set to linux_musl it builds all
modules that haven't explicitly opted out, producing linux_musl_common
variants of java modules. Filter these out of javaFuzzPackager to
avoid conflicts with the linux_glibc_common modules.
Host cross common variants targets were missing the HostCross flag,
so also set it in getCommonTargets.
Bug: 236052820
Test: builds with linux_musl arm64 host cross enabled
Change-Id: I58c846076091bee7df50016c240a176c039c42e9
diff --git a/android/arch.go b/android/arch.go
index 382a7df..e72614c 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -1825,7 +1825,9 @@
for _, t := range targets {
if _, found := set[t.Os.String()]; !found {
set[t.Os.String()] = true
- ret = append(ret, commonTargetMap[t.Os.String()])
+ common := commonTargetMap[t.Os.String()]
+ common.HostCross = t.HostCross
+ ret = append(ret, common)
}
}