Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: snapshot_toolchain.gni

Issue 2265983002: Use clang for snapshot_toolchain by default, except on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Change default. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot_toolchain.gni
diff --git a/snapshot_toolchain.gni b/snapshot_toolchain.gni
index a03e35a26ebbc8c9c4f769f65ab26bbf9abad801..893bdc589f95ca0435c005e946ad591bbc8e3c7e 100644
--- a/snapshot_toolchain.gni
+++ b/snapshot_toolchain.gni
@@ -50,32 +50,28 @@ declare_args() {
# for the other supported configurations.
if (v8_snapshot_toolchain == "") {
-
if (current_os == host_os && current_cpu == host_cpu) {
# This is not a cross-compile, so build the snapshot with the current
# toolchain.
v8_snapshot_toolchain = current_toolchain
-
} else if (current_os == host_os && current_cpu == "x86" &&
host_cpu == "x64") {
# This is an x64 -> x86 cross-compile, but x64 hosts can usually run x86
# binaries built for the same OS, so build the snapshot with the current
# toolchain here, too.
v8_snapshot_toolchain = current_toolchain
-
} else if (current_os == "win" && host_os == "mac" && is_clang) {
# This is a mac -> win cross-compile, which is only supported w/ clang.
v8_snapshot_toolchain = "//build/toolchain/mac:clang_${v8_current_cpu}"
-
} else if (host_cpu == "x64") {
# This is a cross-compile from an x64 host to either a non-Intel target
- # cpu or a different target OS. Assume the same toolchain (Clang or GCC
- # or MSVS) for target and host, unless this is an Android build, where
- # Clang is always used on the host.
- if (is_clang || is_android) {
- _clang = "clang_"
- } else {
+ # cpu or a different target OS. Clang will always be used by default on the
+ # host, unless this is a ChromeOS build, in which case the same toolchain
+ # (Clang or GCC) will be used for target and host by default.
+ if (is_chromeos && !is_clang) {
_clang = ""
+ } else {
+ _clang = "clang_"
}
if (v8_current_cpu == "x64" || v8_current_cpu == "x86") {
@@ -98,4 +94,4 @@ if (v8_snapshot_toolchain == "") {
assert(v8_snapshot_toolchain != "",
"Do not know how to build a snapshot for $current_toolchain " +
- "on $host_os $host_cpu")
+ "on $host_os $host_cpu")
Dirk Pranke 2016/08/22 23:08:45 Was this indentation change intentional?
slan 2016/08/22 23:18:08 That's what gn format wanted.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698