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

Unified Diff: BUILD.gn

Issue 2736993004: [build] Add v8gen support for PPC/s390 architecture (Closed)
Patch Set: reverted bots to use gyp Created 3 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 | « .gn ('k') | infra/mb/mb_config.pyl » ('j') | 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 499baeb852bb1dc2610339b8164c506f99fb8d14..1ecee1f975272b581f8b9dd3554990ef7bf5d7b1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -101,6 +101,19 @@ declare_args() {
v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" ||
v8_current_cpu == "x87") && (is_linux || is_mac)) ||
(v8_current_cpu == "ppc64" && is_linux)
+
+ # Set v8_host_byteorder
+ v8_host_byteorder = "little"
+
+ # ppc64 can be either BE or LE
+ if (host_cpu == "ppc64") {
+ v8_host_byteorder =
+ exec_script("//tools/get_byteorder.py", [], "trim string")
+ }
+ if (host_cpu == "ppc" || host_cpu == "s390" || host_cpu == "s390x" ||
+ host_cpu == "mips" || host_cpu == "mips64") {
+ v8_host_byteorder = "big"
+ }
}
# Derived defaults.
@@ -355,8 +368,31 @@ config("toolchain") {
if (v8_current_cpu == "s390x") {
defines += [ "V8_TARGET_ARCH_S390X" ]
}
- if (host_cpu == "x64" || host_cpu == "x86") {
+ if (v8_host_byteorder == "little") {
defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
+ } else {
+ cflags += [ "-march=z196" ]
+ }
+ }
+ if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
+ defines += [ "V8_TARGET_ARCH_PPC" ]
+ if (v8_current_cpu == "ppc64") {
+ defines += [ "V8_TARGET_ARCH_PPC64" ]
+ }
+ if (v8_host_byteorder == "little") {
+ defines += [ "V8_TARGET_ARCH_PPC_LE" ]
+ } else if (v8_host_byteorder == "big") {
+ defines += [ "V8_TARGET_ARCH_PPC_BE" ]
+ if (current_os == "aix") {
+ cflags += [
+ # Work around AIX ceil, trunc and round oddities.
+ "-mcpu=power5+",
+ "-mfprnd",
+
+ # Work around AIX assembler popcntb bug.
+ "-mno-popcntb",
+ ]
+ }
}
}
if (v8_current_cpu == "x86") {
« no previous file with comments | « .gn ('k') | infra/mb/mb_config.pyl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698