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

Side by Side Diff: BUILD.gn

Issue 2809963004: For building v8 using gn on aix_ppc64, linux_s390x and linux_ppc64. (Closed)
Patch Set: rebased, uses host_byteorder.gni now Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « .gn ('k') | src/base/build_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/arm.gni") 6 import("//build/config/arm.gni")
7 import("//build/config/dcheck_always_on.gni") 7 import("//build/config/dcheck_always_on.gni")
8 import("//build/config/host_byteorder.gni")
8 import("//build/config/mips.gni") 9 import("//build/config/mips.gni")
9 import("//build/config/sanitizers/sanitizers.gni") 10 import("//build/config/sanitizers/sanitizers.gni")
10 11
11 if (is_android) { 12 if (is_android) {
12 import("//build/config/android/rules.gni") 13 import("//build/config/android/rules.gni")
13 } 14 }
14 15
15 import("gni/v8.gni") 16 import("gni/v8.gni")
16 import("gni/isolate.gni") 17 import("gni/isolate.gni")
17 import("snapshot_toolchain.gni") 18 import("snapshot_toolchain.gni")
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 # Like v8_extra_library_files but for experimental features. 102 # Like v8_extra_library_files but for experimental features.
102 # 103 #
103 # This default is used by cctests. Projects using V8 will want to override. 104 # This default is used by cctests. Projects using V8 will want to override.
104 v8_experimental_extra_library_files = 105 v8_experimental_extra_library_files =
105 [ "//test/cctest/test-experimental-extra.js" ] 106 [ "//test/cctest/test-experimental-extra.js" ]
106 107
107 v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" || 108 v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" ||
108 v8_current_cpu == "x87") && (is_linux || is_mac)) || 109 v8_current_cpu == "x87") && (is_linux || is_mac)) ||
109 (v8_current_cpu == "ppc64" && is_linux) 110 (v8_current_cpu == "ppc64" && is_linux)
110
111 # Set v8_host_byteorder
112 v8_host_byteorder = "little"
113
114 # ppc64 can be either BE or LE
115 if (host_cpu == "ppc64") {
116 v8_host_byteorder =
117 exec_script("//tools/get_byteorder.py", [], "trim string")
118 }
119 if (host_cpu == "ppc" || host_cpu == "s390" || host_cpu == "s390x" ||
120 host_cpu == "mips" || host_cpu == "mips64") {
121 v8_host_byteorder = "big"
122 }
123 } 111 }
124 112
125 # Derived defaults. 113 # Derived defaults.
126 if (v8_enable_verify_heap == "") { 114 if (v8_enable_verify_heap == "") {
127 v8_enable_verify_heap = is_debug 115 v8_enable_verify_heap = is_debug
128 } 116 }
129 if (v8_enable_object_print == "") { 117 if (v8_enable_object_print == "") {
130 v8_enable_object_print = is_debug 118 v8_enable_object_print = is_debug
131 } 119 }
132 if (v8_enable_disassembler == "") { 120 if (v8_enable_disassembler == "") {
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 defines += [ "_MIPS_ARCH_MIPS64R6" ] 360 defines += [ "_MIPS_ARCH_MIPS64R6" ]
373 } else if (mips_arch_variant == "r2") { 361 } else if (mips_arch_variant == "r2") {
374 defines += [ "_MIPS_ARCH_MIPS64R2" ] 362 defines += [ "_MIPS_ARCH_MIPS64R2" ]
375 } 363 }
376 } 364 }
377 if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { 365 if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
378 defines += [ "V8_TARGET_ARCH_S390" ] 366 defines += [ "V8_TARGET_ARCH_S390" ]
379 if (v8_current_cpu == "s390x") { 367 if (v8_current_cpu == "s390x") {
380 defines += [ "V8_TARGET_ARCH_S390X" ] 368 defines += [ "V8_TARGET_ARCH_S390X" ]
381 } 369 }
382 if (v8_host_byteorder == "little") { 370 if (host_byteorder == "little") {
383 defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ] 371 defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
384 } else { 372 } else {
385 cflags += [ "-march=z196" ] 373 cflags += [ "-march=z196" ]
386 } 374 }
387 } 375 }
388 if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { 376 if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
389 defines += [ "V8_TARGET_ARCH_PPC" ] 377 defines += [ "V8_TARGET_ARCH_PPC" ]
390 if (v8_current_cpu == "ppc64") { 378 if (v8_current_cpu == "ppc64") {
391 defines += [ "V8_TARGET_ARCH_PPC64" ] 379 defines += [ "V8_TARGET_ARCH_PPC64" ]
392 } 380 }
393 if (v8_host_byteorder == "little") { 381 if (host_byteorder == "little") {
394 defines += [ "V8_TARGET_ARCH_PPC_LE" ] 382 defines += [ "V8_TARGET_ARCH_PPC_LE" ]
395 } else if (v8_host_byteorder == "big") { 383 } else if (host_byteorder == "big") {
396 defines += [ "V8_TARGET_ARCH_PPC_BE" ] 384 defines += [ "V8_TARGET_ARCH_PPC_BE" ]
397 if (current_os == "aix") { 385 if (current_os == "aix") {
398 cflags += [ 386 cflags += [
399 # Work around AIX ceil, trunc and round oddities. 387 # Work around AIX ceil, trunc and round oddities.
400 "-mcpu=power5+", 388 "-mcpu=power5+",
401 "-mfprnd", 389 "-mfprnd",
402 390
403 # Work around AIX assembler popcntb bug. 391 # Work around AIX assembler popcntb bug.
404 "-mno-popcntb", 392 "-mno-popcntb",
405 ] 393 ]
406 } 394 }
407 } 395 }
408 } 396 }
397
409 if (v8_current_cpu == "x86") { 398 if (v8_current_cpu == "x86") {
410 defines += [ "V8_TARGET_ARCH_IA32" ] 399 defines += [ "V8_TARGET_ARCH_IA32" ]
411 if (is_win) { 400 if (is_win) {
412 # Ensure no surprising artifacts from 80bit double math with x86. 401 # Ensure no surprising artifacts from 80bit double math with x86.
413 cflags += [ "/arch:SSE2" ] 402 cflags += [ "/arch:SSE2" ]
414 } 403 }
415 } 404 }
416 if (v8_current_cpu == "x64") { 405 if (v8_current_cpu == "x64") {
417 defines += [ "V8_TARGET_ARCH_X64" ] 406 defines += [ "V8_TARGET_ARCH_X64" ]
418 if (is_win) { 407 if (is_win) {
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 if (is_linux) { 2449 if (is_linux) {
2461 sources += [ 2450 sources += [
2462 "src/base/debug/stack_trace_posix.cc", 2451 "src/base/debug/stack_trace_posix.cc",
2463 "src/base/platform/platform-linux.cc", 2452 "src/base/platform/platform-linux.cc",
2464 ] 2453 ]
2465 2454
2466 libs = [ 2455 libs = [
2467 "dl", 2456 "dl",
2468 "rt", 2457 "rt",
2469 ] 2458 ]
2459 } else if (current_os == "aix") {
2460 sources += [
2461 "src/base/debug/stack_trace_posix.cc",
2462 "src/base/platform/platform-aix.cc",
2463 ]
2464
2465 libs = [
2466 "dl",
2467 "rt",
2468 ]
2470 } else if (is_android) { 2469 } else if (is_android) {
2471 if (current_toolchain == host_toolchain) { 2470 if (current_toolchain == host_toolchain) {
2472 libs = [ 2471 libs = [
2473 "dl", 2472 "dl",
2474 "rt", 2473 "rt",
2475 ] 2474 ]
2476 if (host_os == "mac") { 2475 if (host_os == "mac") {
2477 sources += [ 2476 sources += [
2478 "src/base/debug/stack_trace_posix.cc", 2477 "src/base/debug/stack_trace_posix.cc",
2479 "src/base/platform/platform-macos.cc", 2478 "src/base/platform/platform-macos.cc",
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
3196 ] 3195 ]
3197 3196
3198 configs = [ 3197 configs = [
3199 ":external_config", 3198 ":external_config",
3200 ":internal_config_base", 3199 ":internal_config_base",
3201 ] 3200 ]
3202 } 3201 }
3203 3202
3204 v8_fuzzer("wasm_compile_fuzzer") { 3203 v8_fuzzer("wasm_compile_fuzzer") {
3205 } 3204 }
OLDNEW
« no previous file with comments | « .gn ('k') | src/base/build_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698