OLD | NEW |
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/mips.gni") | 8 import("//build/config/mips.gni") |
9 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 # Like v8_extra_library_files but for experimental features. | 95 # Like v8_extra_library_files but for experimental features. |
96 # | 96 # |
97 # This default is used by cctests. Projects using V8 will want to override. | 97 # This default is used by cctests. Projects using V8 will want to override. |
98 v8_experimental_extra_library_files = | 98 v8_experimental_extra_library_files = |
99 [ "//test/cctest/test-experimental-extra.js" ] | 99 [ "//test/cctest/test-experimental-extra.js" ] |
100 | 100 |
101 v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" || | 101 v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" || |
102 v8_current_cpu == "x87") && (is_linux || is_mac)) || | 102 v8_current_cpu == "x87") && (is_linux || is_mac)) || |
103 (v8_current_cpu == "ppc64" && is_linux) | 103 (v8_current_cpu == "ppc64" && is_linux) |
| 104 |
| 105 # Set v8_host_byteorder |
| 106 v8_host_byteorder = "little" |
| 107 |
| 108 # ppc64 can be either BE or LE |
| 109 if (host_cpu == "ppc64") { |
| 110 v8_host_byteorder = |
| 111 exec_script("//tools/get_byteorder.py", [], "trim string") |
| 112 } |
| 113 if (host_cpu == "ppc" || host_cpu == "s390" || host_cpu == "s390x" || |
| 114 host_cpu == "mips" || host_cpu == "mips64") { |
| 115 v8_host_byteorder = "big" |
| 116 } |
104 } | 117 } |
105 | 118 |
106 # Derived defaults. | 119 # Derived defaults. |
107 if (v8_enable_verify_heap == "") { | 120 if (v8_enable_verify_heap == "") { |
108 v8_enable_verify_heap = is_debug | 121 v8_enable_verify_heap = is_debug |
109 } | 122 } |
110 if (v8_enable_object_print == "") { | 123 if (v8_enable_object_print == "") { |
111 v8_enable_object_print = is_debug | 124 v8_enable_object_print = is_debug |
112 } | 125 } |
113 if (v8_enable_disassembler == "") { | 126 if (v8_enable_disassembler == "") { |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 defines += [ "_MIPS_ARCH_MIPS64R6" ] | 361 defines += [ "_MIPS_ARCH_MIPS64R6" ] |
349 } else if (mips_arch_variant == "r2") { | 362 } else if (mips_arch_variant == "r2") { |
350 defines += [ "_MIPS_ARCH_MIPS64R2" ] | 363 defines += [ "_MIPS_ARCH_MIPS64R2" ] |
351 } | 364 } |
352 } | 365 } |
353 if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { | 366 if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { |
354 defines += [ "V8_TARGET_ARCH_S390" ] | 367 defines += [ "V8_TARGET_ARCH_S390" ] |
355 if (v8_current_cpu == "s390x") { | 368 if (v8_current_cpu == "s390x") { |
356 defines += [ "V8_TARGET_ARCH_S390X" ] | 369 defines += [ "V8_TARGET_ARCH_S390X" ] |
357 } | 370 } |
358 if (host_cpu == "x64" || host_cpu == "x86") { | 371 if (v8_host_byteorder == "little") { |
359 defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ] | 372 defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ] |
| 373 } else { |
| 374 cflags += [ "-march=z196" ] |
| 375 } |
| 376 } |
| 377 if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { |
| 378 defines += [ "V8_TARGET_ARCH_PPC" ] |
| 379 if (v8_current_cpu == "ppc64") { |
| 380 defines += [ "V8_TARGET_ARCH_PPC64" ] |
| 381 } |
| 382 if (v8_host_byteorder == "little") { |
| 383 defines += [ "V8_TARGET_ARCH_PPC_LE" ] |
| 384 } else if (v8_host_byteorder == "big") { |
| 385 defines += [ "V8_TARGET_ARCH_PPC_BE" ] |
| 386 if (current_os == "aix") { |
| 387 cflags += [ |
| 388 # Work around AIX ceil, trunc and round oddities. |
| 389 "-mcpu=power5+", |
| 390 "-mfprnd", |
| 391 |
| 392 # Work around AIX assembler popcntb bug. |
| 393 "-mno-popcntb", |
| 394 ] |
| 395 } |
360 } | 396 } |
361 } | 397 } |
362 if (v8_current_cpu == "x86") { | 398 if (v8_current_cpu == "x86") { |
363 defines += [ "V8_TARGET_ARCH_IA32" ] | 399 defines += [ "V8_TARGET_ARCH_IA32" ] |
364 if (is_win) { | 400 if (is_win) { |
365 # Ensure no surprising artifacts from 80bit double math with x86. | 401 # Ensure no surprising artifacts from 80bit double math with x86. |
366 cflags += [ "/arch:SSE2" ] | 402 cflags += [ "/arch:SSE2" ] |
367 } | 403 } |
368 } | 404 } |
369 if (v8_current_cpu == "x64") { | 405 if (v8_current_cpu == "x64") { |
(...skipping 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3126 ] | 3162 ] |
3127 | 3163 |
3128 configs = [ | 3164 configs = [ |
3129 ":external_config", | 3165 ":external_config", |
3130 ":internal_config_base", | 3166 ":internal_config_base", |
3131 ] | 3167 ] |
3132 } | 3168 } |
3133 | 3169 |
3134 v8_fuzzer("wasm_compile_fuzzer") { | 3170 v8_fuzzer("wasm_compile_fuzzer") { |
3135 } | 3171 } |
OLD | NEW |