Reviewers: jochen (traveling), marja,
Message:
Not sure if jochen is reviewing while travelling, so picking the two of you.
Description:
gn build changes for v8
mksnapshot wasn't being built correctly for android. cflags/ldflags
need to include m32 when building on x64 but targetting arm.
This matches what the gyp side was doing.
When rolling into chrome I'll need to include
https://codereview.chromium.org/988183003 .
[email protected]
BUG=465456
Please review this at https://codereview.chromium.org/991023002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+31, -1 lines):
M BUILD.gn
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index
eaf56dd9db26b4e3733ea3da4c864bfe1d5e1ff3..69f4a616fd530fb7b33d5eee72c7fda1e2354cb1
100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -18,7 +18,7 @@ v8_interpreted_regexp = false
v8_object_print = false
v8_postmortem_support = false
v8_use_snapshot = true
-v8_target_arch = current_cpu
+v8_target_arch = target_cpu
v8_random_seed = "314159265"
v8_toolset_for_d8 = "host"
@@ -56,6 +56,20 @@ config("external_config") {
include_dirs = [ "include" ]
}
+declare_args() {
+ host_cxx_is_biarch = 0
+ if (host_cpu == "ia32" || host_cpu =="x64" || host_cpu=="ppc" ||
+ host_cpu=="ppc64" || is_clang) {
+ host_cxx_is_biarch = 1
+ }
+
+ target_cxx_is_biarch = 0
+ if (target_cpu == "ia32" || target_cpu == "x64" || target_cpu == "x87" ||
+ target_cpu == "ppc" || target_cpu == "ppc64" || is_clang) {
+ target_cxx_is_biarch = 1
+ }
+}
+
config("features") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
@@ -95,6 +109,7 @@ config("toolchain") {
defines = []
cflags = []
+ ldflags = []
# TODO(jochen): Add support for arm subarchs, mips, mipsel.
@@ -151,6 +166,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" ]
+ }
+ }
+ }
}
###############################################################################
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.