Add first_perfer32 option to compile_multilib
NDK has 4 ABIs, i.e. x86, x86_64, armv7-a, armv8-a, but cintltst
can only compiled into single ABI, or otherwise, the java_test_host
CtsIcu4cTestCases can't include cintltst in the "data" property
because the "data" property can only include dependecies with
a single variant/ABI.
CtsIcu4cTestCases needs to use "data" property instead of
"host_required" dependency because "host_required" relationship
does not work for streaming the "general_tests" in the post-submit
infra-strucuture. See https://r.android.com/1175350 for the details.
Bug: 168445204
Bug: 160350521
Test: OUT_DIR=ndk_out build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I81429cc261ec4e25aefe363abb099048ff026505
diff --git a/android/arch.go b/android/arch.go
index 2decea8..6fb70c9 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -1609,13 +1609,15 @@
} else {
buildTargets = firstTarget(targets, "lib64", "lib32")
}
+ case "first_prefer32":
+ buildTargets = firstTarget(targets, "lib32", "lib64")
case "prefer32":
buildTargets = filterMultilibTargets(targets, "lib32")
if len(buildTargets) == 0 {
buildTargets = filterMultilibTargets(targets, "lib64")
}
default:
- return nil, fmt.Errorf(`compile_multilib must be "both", "first", "32", "64", or "prefer32" found %q`,
+ return nil, fmt.Errorf(`compile_multilib must be "both", "first", "32", "64", "prefer32" or "first_prefer32" found %q`,
multilib)
}