summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2016-01-15 13:52:07 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-15 21:53:11 +0000
commit8391051c80fa58d3b4a9021f4185cbc71e69f32e (patch)
treed17052eceb9bd65489ba9a89804fdda6d5247207 /build
parent26ee1d9a89bbbf1f0b24bf15e1678630412d3605 (diff)
downloadchromium_src-8391051c80fa58d3b4a9021f4185cbc71e69f32e.zip
chromium_src-8391051c80fa58d3b4a9021f4185cbc71e69f32e.tar.gz
chromium_src-8391051c80fa58d3b4a9021f4185cbc71e69f32e.tar.bz2
win: Call clang-cl instead of clang-cl.exe when targeting win on a non-win host.
No behavior change, since non-win hosts targeting windows currently don't exist. But if they did, there are three choices for how to invoke the compiler: 1. Call the compiler on the host clang-cl.exe instead of clang-cl. That's weird because clang-cl is a host-native binary. 2. Don't append ".exe" to any program in build/toolchain/win/BUILD.gn -- it's probably not needed on Windows. But if we end up running real Windows binaries on non-Windows (e.g. midl.exe through wine), then those would have a .exe extension on the non-Windows host. 3. Do what this CL does. This seems nicest. BUG=495204 Review URL: https://codereview.chromium.org/1585113007 Cr-Commit-Position: refs/heads/master@{#369854}
Diffstat (limited to 'build')
-rw-r--r--build/toolchain/win/BUILD.gn10
1 files changed, 8 insertions, 2 deletions
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index 0233353..4fb7279 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -235,6 +235,12 @@ template("msvc_toolchain") {
}
}
+if (host_os == "win") {
+ clang_cl = "clang-cl.exe"
+} else {
+ clang_cl = "clang-cl"
+}
+
# 32-bit toolchains. Only define these when the target architecture is 32-bit
# since we don't do any 32-bit cross compiles when targeting 64-bit (the
# build does generate some 64-bit stuff from 32-bit target builds).
@@ -261,7 +267,7 @@ if (target_cpu == "x86") {
toolchain_cpu = "x86"
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
root_build_dir)
- cl = "${goma_prefix}$prefix/clang-cl.exe"
+ cl = "${goma_prefix}$prefix/${clang_cl}"
toolchain_os = "win"
is_clang = true
}
@@ -290,7 +296,7 @@ msvc_toolchain("clang_x64") {
toolchain_cpu = "x64"
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
root_build_dir)
- cl = "${goma_prefix}$prefix/clang-cl.exe"
+ cl = "${goma_prefix}$prefix/${clang_cl}"
toolchain_os = "win"
is_clang = true
}