From 71eceae80ad2ae330ef0597d825509163d1024ed Mon Sep 17 00:00:00 2001 From: thakis Date: Mon, 31 Oct 2016 13:22:40 -0700 Subject: [PATCH] Android: Prefix target toolchain names with "android_". In x64 builds with clang, we also build a 32-bit binary to ship webview in both 32-bit and 64-bit. The 32-bit part is built twice, once for the linux host to be able to run v8's mksnapshot, and once for the android target for the actual binary. Before this change, both the host toolchain and the target toolchain were called "clang_x86", and they clobbered each other. (In gcc builds, the target toolchain was called just "x86" while the host still used clang, so it happened to work there, mostly by accident.) BUG=660857,605315 Review-Url: https://codereview.chromium.org/2463143002 Cr-Original-Commit-Position: refs/heads/master@{#428783} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 042f129b96ea6e989df1efe0e4a30dcac09f05a7 --- config/BUILDCONFIG.gn | 4 ++-- config/android/config.gni | 4 ++-- toolchain/android/BUILD.gn | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn index 668540579..942605e38 100644 --- a/config/BUILDCONFIG.gn +++ b/config/BUILDCONFIG.gn @@ -216,9 +216,9 @@ if (target_os == "android") { assert(host_os == "linux" || host_os == "mac", "Android builds are only supported on Linux and Mac hosts.") if (is_clang) { - _default_toolchain = "//build/toolchain/android:clang_$target_cpu" + _default_toolchain = "//build/toolchain/android:android_clang_$target_cpu" } else { - _default_toolchain = "//build/toolchain/android:$target_cpu" + _default_toolchain = "//build/toolchain/android:android_$target_cpu" } } else if (target_os == "chromeos" || target_os == "linux") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. diff --git a/config/android/config.gni b/config/android/config.gni index 5dc4ff3e0..df64d400c 100644 --- a/config/android/config.gni +++ b/config/android/config.gni @@ -334,10 +334,10 @@ if (is_android) { if (defined(android_secondary_abi_cpu)) { if (is_clang) { android_secondary_abi_toolchain = - "//build/toolchain/android:clang_${android_secondary_abi_cpu}" + "//build/toolchain/android:android_clang_${android_secondary_abi_cpu}" } else { android_secondary_abi_toolchain = - "//build/toolchain/android:${android_secondary_abi_cpu}" + "//build/toolchain/android:android_${android_secondary_abi_cpu}" } } } diff --git a/toolchain/android/BUILD.gn b/toolchain/android/BUILD.gn index 917c46917..ad7b76278 100644 --- a/toolchain/android/BUILD.gn +++ b/toolchain/android/BUILD.gn @@ -70,12 +70,12 @@ template("android_gcc_toolchain") { } template("android_gcc_toolchains_helper") { - android_gcc_toolchain(target_name) { + android_gcc_toolchain("android_$target_name") { forward_variables_from(invoker, "*") toolchain_args.is_clang = false } - android_gcc_toolchain("clang_$target_name") { + android_gcc_toolchain("android_clang_$target_name") { forward_variables_from(invoker, "*") toolchain_args.is_clang = true }