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

Unified Diff: BUILD.gn

Issue 991023002: gn build changes for v8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enable_correct_v8_arch Created 5 years, 9 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: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index eaf56dd9db26b4e3733ea3da4c864bfe1d5e1ff3..e5f6ed94f1e0520b47caaaec777f8877ce7a9528 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -19,6 +19,9 @@ v8_object_print = false
v8_postmortem_support = false
v8_use_snapshot = true
v8_target_arch = current_cpu
+if (enable_correct_v8_arch) {
+ v8_target_arch = target_cpu
+}
v8_random_seed = "314159265"
v8_toolset_for_d8 = "host"
@@ -56,6 +59,15 @@ config("external_config") {
include_dirs = [ "include" ]
}
+declare_args() {
+ host_cxx_is_biarch = 0
+ if (enable_correct_v8_arch &&
+ (host_cpu == "ia32" || host_cpu =="x64" || host_cpu=="ppc" ||
+ host_cpu=="ppc64" || is_clang)) {
+ host_cxx_is_biarch = 1
+ }
+}
+
config("features") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
@@ -95,6 +107,7 @@ config("toolchain") {
defines = []
cflags = []
+ ldflags = []
# TODO(jochen): Add support for arm subarchs, mips, mipsel.
@@ -151,6 +164,21 @@ config("toolchain") {
"OPTIMIZED_DEBUG",
]
}
+
+ if ((current_os == "linux" || current_os == "freebsd" ||
+ current_os == "openbsd" || current_os == "solaris" ||
+ current_os == "netbsd" || current_os == "mac" ||
+ current_os == "android" || current_os == "qnx") &&
+ (v8_target_arch == "arm" || v8_target_arch == "ia32" ||
+ v8_target_arch == "x87" || v8_target_arch == "mips" ||
+ v8_target_arch == "mipsel" || v8_target_arch == "ppc")) {
+ if (current_toolchain == host_toolchain) {
+ if (host_cxx_is_biarch == 1) {
+ cflags += [ "-m32" ]
+ ldflags += [ "-m32" ]
+ }
+ }
+ }
}
###############################################################################
« 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