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
This commit is contained in:
@@ -1825,7 +1825,9 @@ func getCommonTargets(targets []Target) []Target {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -171,6 +171,10 @@ func (s *javaFuzzPackager) GenerateBuildActions(ctx android.SingletonContext) {
|
||||
return
|
||||
}
|
||||
|
||||
if javaFuzzModule.Target().HostCross {
|
||||
return
|
||||
}
|
||||
|
||||
fuzzModuleValidator := fuzz.FuzzModule{
|
||||
javaFuzzModule.ModuleBase,
|
||||
javaFuzzModule.DefaultableModuleBase,
|
||||
|
Reference in New Issue
Block a user