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

Unified Diff: snapshot_toolchain.gni

Issue 2175693003: Revert of Re-land "Fix double-building of v8 in GN builds" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 ceda840d427457e417ee73f87b0fcba595602257..5fe19fd6953fa165eedaf9b1fb1ab72e6a7efaa7 100644
--- a/snapshot_toolchain.gni
+++ b/snapshot_toolchain.gni
@@ -38,46 +38,26 @@
# configurations v8 runs on.
if (v8_snapshot_toolchain == "") {
if (host_cpu == "x64" && host_os == "linux") {
- if (v8_current_cpu == v8_target_cpu && current_cpu == target_cpu &&
- (target_cpu == "x86" || target_cpu == "x64")) {
- # Args that are specified by the user can end up having the same
- # effect as args that are specified in a toolchain; for example,
- # building on linux x64 with target_cpu == "x86" v8_target_cpu == "arm"
- # will use the //build/toolchain/linux:clang_x86 toolchain, but have the
- # same effect as if you specified
- #
- # custom_toolchain="//build/toolchain/linux:clang_x86_v8_arm"
- #
- # As a result, if we didn't take that into account we could
- # accidentally end up building two identical copies of v8.
- #
- # So, we can re-use the default toolchain for the snapshot in these
- # casees, but only when the host is actually capable of running the
- # target code, which at this time means that the target_cpu == x86
- # or x64.
- v8_snapshot_toolchain = default_toolchain
+ if (current_cpu == "arm" || current_cpu == "mipsel" ||
+ current_cpu == "x86") {
+ _snapshot_cpu = "x86"
} else {
- if (current_cpu == "arm" || current_cpu == "mipsel" ||
- current_cpu == "x86") {
- _snapshot_cpu = "x86"
- } else {
- assert(current_cpu == "arm64" || current_cpu == "x64" ||
- current_cpu == "mips64el",
- "Need environment for this arch: $current_cpu")
- _snapshot_cpu = "x64"
- }
+ assert(current_cpu == "arm64" || current_cpu == "x64" ||
+ current_cpu == "mips64el",
+ "Need environment for this arch: $current_cpu")
+ _snapshot_cpu = "x64"
+ }
- if (v8_current_cpu != _snapshot_cpu) {
- _cpus = "${_snapshot_cpu}_v8_${v8_current_cpu}"
- } else {
- _cpus = _snapshot_cpu
- }
+ if (v8_current_cpu != _snapshot_cpu) {
+ _cpus = "${_snapshot_cpu}_v8_${v8_current_cpu}"
+ } else {
+ _cpus = _snapshot_cpu
+ }
- if ((host_os == "linux" && current_os == "android") || is_clang) {
- v8_snapshot_toolchain = "//build/toolchain/linux:clang_${_cpus}"
- } else {
- v8_snapshot_toolchain = "//build/toolchain/linux:${_cpus}"
- }
+ if ((host_os == "linux" && current_os == "android") || is_clang) {
+ v8_snapshot_toolchain = "//build/toolchain/linux:clang_${_cpus}"
+ } else {
+ v8_snapshot_toolchain = "//build/toolchain/linux:${_cpus}"
}
} else if (host_os == "mac" && current_os == "win") {
assert(v8_current_cpu == current_cpu,
« 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