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/mips.gni") | 8 import("//build/config/mips.gni") |
8 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") |
9 | 10 |
10 if (is_android) { | 11 if (is_android) { |
11 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
12 } | 13 } |
13 | 14 |
14 import("gni/v8.gni") | 15 import("gni/v8.gni") |
15 import("gni/isolate.gni") | 16 import("gni/isolate.gni") |
16 import("//build_overrides/v8.gni") | 17 import("//build_overrides/v8.gni") |
(...skipping 16 matching lines...) Expand all Loading... |
33 # Sets -dENABLE_GDB_JIT_INTERFACE. | 34 # Sets -dENABLE_GDB_JIT_INTERFACE. |
34 v8_enable_gdbjit = false | 35 v8_enable_gdbjit = false |
35 | 36 |
36 # Sets -dENABLE_HANDLE_ZAPPING. | 37 # Sets -dENABLE_HANDLE_ZAPPING. |
37 v8_enable_handle_zapping = true | 38 v8_enable_handle_zapping = true |
38 | 39 |
39 # Enable ECMAScript Internationalization API. Enabling this feature will | 40 # Enable ECMAScript Internationalization API. Enabling this feature will |
40 # add a dependency on the ICU library. | 41 # add a dependency on the ICU library. |
41 v8_enable_i18n_support = true | 42 v8_enable_i18n_support = true |
42 | 43 |
| 44 # Enable slow dchecks. |
| 45 v8_enable_slow_dchecks = false |
| 46 |
43 # Interpreted regexp engine exists as platform-independent alternative | 47 # Interpreted regexp engine exists as platform-independent alternative |
44 # based where the regular expression is compiled to a bytecode. | 48 # based where the regular expression is compiled to a bytecode. |
45 v8_interpreted_regexp = false | 49 v8_interpreted_regexp = false |
46 | 50 |
47 # Sets -dOBJECT_PRINT. | 51 # Sets -dOBJECT_PRINT. |
48 v8_object_print = false | 52 v8_object_print = false |
49 | 53 |
| 54 # Turns on compiler optimizations in V8 in Debug build. |
| 55 v8_optimized_debug = true |
| 56 |
50 # With post mortem support enabled, metadata is embedded into libv8 that | 57 # With post mortem support enabled, metadata is embedded into libv8 that |
51 # describes various parameters of the VM for use by debuggers. See | 58 # describes various parameters of the VM for use by debuggers. See |
52 # tools/gen-postmortem-metadata.py for details. | 59 # tools/gen-postmortem-metadata.py for details. |
53 v8_postmortem_support = false | 60 v8_postmortem_support = false |
54 | 61 |
55 # Similar to vfp but on MIPS. | 62 # Similar to vfp but on MIPS. |
56 v8_can_use_fpu_instructions = true | 63 v8_can_use_fpu_instructions = true |
57 | 64 |
58 # Similar to the ARM hard float ABI but on MIPS. | 65 # Similar to the ARM hard float ABI but on MIPS. |
59 v8_use_mips_abi_hardfloat = true | 66 v8_use_mips_abi_hardfloat = true |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 if (is_debug) { | 287 if (is_debug) { |
281 # TODO(jochen): Add support for different debug optimization levels. | 288 # TODO(jochen): Add support for different debug optimization levels. |
282 defines += [ | 289 defines += [ |
283 "ENABLE_DISASSEMBLER", | 290 "ENABLE_DISASSEMBLER", |
284 "V8_ENABLE_CHECKS", | 291 "V8_ENABLE_CHECKS", |
285 "OBJECT_PRINT", | 292 "OBJECT_PRINT", |
286 "VERIFY_HEAP", | 293 "VERIFY_HEAP", |
287 "DEBUG", | 294 "DEBUG", |
288 "TRACE_MAPS", | 295 "TRACE_MAPS", |
289 ] | 296 ] |
290 if (!v8_optimized_debug) { | 297 if (v8_enable_slow_dchecks) { |
291 defines += [ "ENABLE_SLOW_DCHECKS" ] | 298 defines += [ "ENABLE_SLOW_DCHECKS" ] |
292 } | 299 } |
| 300 } else if (dcheck_always_on) { |
| 301 defines += [ "DEBUG" ] |
293 } | 302 } |
294 } | 303 } |
295 | 304 |
296 ############################################################################### | 305 ############################################################################### |
297 # Templates | 306 # Templates |
298 # | 307 # |
299 | 308 |
300 template("v8_source_set") { | 309 template("v8_source_set") { |
301 source_set(target_name) { | 310 source_set(target_name) { |
302 forward_variables_from(invoker, "*", [ "configs" ]) | 311 forward_variables_from(invoker, "*", [ "configs" ]) |
303 configs += invoker.configs | 312 configs += invoker.configs |
304 configs -= [ "//build/config/compiler:chromium_code" ] | 313 configs -= [ "//build/config/compiler:chromium_code" ] |
305 configs += [ "//build/config/compiler:no_chromium_code" ] | 314 configs += [ "//build/config/compiler:no_chromium_code" ] |
306 configs += [ | 315 configs += [ |
307 ":features", | 316 ":features", |
308 ":toolchain", | 317 ":toolchain", |
309 ] | 318 ] |
310 | 319 |
311 if (!is_debug || v8_optimized_debug) { | 320 # TODO(machenbach): This config doesn't affect executables and components. |
| 321 # It should be moved to a common place. |
| 322 if (is_debug && !v8_optimized_debug) { |
| 323 configs -= [ "//build/config/compiler:default_optimization" ] |
| 324 configs += [ "//build/config/compiler:no_optimize" ] |
| 325 } else { |
312 configs -= [ "//build/config/compiler:default_optimization" ] | 326 configs -= [ "//build/config/compiler:default_optimization" ] |
313 configs += [ "//build/config/compiler:optimize_max" ] | 327 configs += [ "//build/config/compiler:optimize_max" ] |
314 } | 328 } |
315 } | 329 } |
316 } | 330 } |
317 | 331 |
318 ############################################################################### | 332 ############################################################################### |
319 # Actions | 333 # Actions |
320 # | 334 # |
321 | 335 |
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 ] | 2284 ] |
2271 | 2285 |
2272 deps = [ | 2286 deps = [ |
2273 ":fuzzer_support", | 2287 ":fuzzer_support", |
2274 ] | 2288 ] |
2275 | 2289 |
2276 configs = [ ":internal_config" ] | 2290 configs = [ ":internal_config" ] |
2277 } | 2291 } |
2278 | 2292 |
2279 v8_fuzzer("wasm_asmjs_fuzzer") {} | 2293 v8_fuzzer("wasm_asmjs_fuzzer") {} |
OLD | NEW |