Skip to content

Commit

Permalink
Android: Prefix target toolchain names with "android_".
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
nico authored and Commit bot committed Oct 31, 2016
1 parent b3e2560 commit 042f129
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build/config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions build/config/android/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions build/toolchain/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 042f129

Please sign in to comment.