From 9448e8fd56e11dc1444644e8e498be2ccccd5839 Mon Sep 17 00:00:00 2001 From: Victor Chang Date: Mon, 14 Sep 2020 15:34:16 +0100 Subject: [PATCH] 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 --- android/arch.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/arch.go b/android/arch.go index 2decea8a5..6fb70c9f1 100644 --- a/android/arch.go +++ b/android/arch.go @@ -1609,13 +1609,15 @@ func decodeMultilibTargets(multilib string, targets []Target, prefer32 bool) ([] } 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) }