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

Unified Diff: snapshot_toolchain.gni

Issue 2166173002: Fix double-building of v8 in GN builds when setting just v8_target_cpu. (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 824e7e006242c60bade4e849f716a9481202475e..e7e67274f403d75b956a2a27bc8324fcbf8081da 100644
--- a/snapshot_toolchain.gni
+++ b/snapshot_toolchain.gni
@@ -33,11 +33,21 @@ declare_args() {
v8_snapshot_toolchain = ""
}
-# TODO(GYP): For now we only support 32-bit little-endian target builds from an
-# x64 Linux host. Eventually we need to support all of the host/target
-# configurations v8 runs on.
+# TODO(GYP): Fill in any missing host/target combinations.
if (v8_snapshot_toolchain == "") {
- if (host_cpu == "x64" && host_os == "linux") {
+ if (v8_current_cpu == v8_target_cpu && current_cpu == target_cpu) {
+ # 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 v8_target_cpu == "arm64" will use
+ # the //build/toolchain/linux:clang_x64 toolchain, but have the
+ # same effect as if you specified
+ #
+ # custom_toolchain="//build/toolchain/linux:clang_x64_v8_arm64"
+ #
+ # As a result, if we didn't take that into account we could
+ # accidentally end up building two identical copies of v8.
+ v8_snapshot_toolchain = default_toolchain
+ } else if (host_cpu == "x64" && host_os == "linux") {
if (current_cpu == "arm" || current_cpu == "mipsel" ||
current_cpu == "x86") {
_snapshot_cpu = "x86"
« 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