0

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-Commit-Position: refs/heads/master@{#428783}
This commit is contained in:
thakis
2016-10-31 13:22:40 -07:00
committed by Commit bot
parent b3e2560f91
commit 042f129b96
3 changed files with 6 additions and 6 deletions
build
config
toolchain
android

@@ -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.

@@ -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}"
}
}
}

@@ -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
}