Chromium Code Reviews| Index: BUILD.gn |
| diff --git a/BUILD.gn b/BUILD.gn |
| index 8d02b1b4888b3e2756e119412cac22a066016368..81240d0cd524d63ff4d8519743efab2d2ef0b574 100644 |
| --- a/BUILD.gn |
| +++ b/BUILD.gn |
| @@ -4,6 +4,7 @@ |
| import("//build/config/android/config.gni") |
| import("//build/config/arm.gni") |
| +import("//build/config/dcheck_always_on.gni") |
| import("//build/config/mips.gni") |
| import("//build/config/sanitizers/sanitizers.gni") |
| @@ -47,6 +48,9 @@ declare_args() { |
| # add a dependency on the ICU library. |
| v8_enable_i18n_support = true |
| + # Enable slow dchecks. |
| + v8_enable_slow_dchecks = false |
| + |
| # Interpreted regexp engine exists as platform-independent alternative |
| # based where the regular expression is compiled to a bytecode. |
| v8_interpreted_regexp = false |
| @@ -54,6 +58,9 @@ declare_args() { |
| # Sets -dOBJECT_PRINT. |
| v8_object_print = false |
| + # Turns on compiler optimizations in V8 in Debug build. |
| + v8_optimized_debug = true |
| + |
| # With post mortem support enabled, metadata is embedded into libv8 that |
| # describes various parameters of the VM for use by debuggers. See |
| # tools/gen-postmortem-metadata.py for details. |
| @@ -130,6 +137,9 @@ config("features") { |
| defines = [] |
| + if (!is_debug && dcheck_always_on) { |
| + defines += [ "DEBUG" ] |
|
vogelheim
2016/05/31 14:04:54
readability nitpick, and not really sure about thi
Michael Achenbach
2016/05/31 14:14:34
Yea - can do. I wasn't really sure about what is a
|
| + } |
| if (v8_enable_disassembler) { |
| defines += [ "ENABLE_DISASSEMBLER" ] |
| } |
| @@ -294,7 +304,7 @@ config("toolchain") { |
| "DEBUG", |
| "TRACE_MAPS", |
| ] |
| - if (!v8_optimized_debug) { |
| + if (v8_enable_slow_dchecks) { |
| defines += [ "ENABLE_SLOW_DCHECKS" ] |
| } |
| } |
| @@ -315,7 +325,12 @@ template("v8_source_set") { |
| ":toolchain", |
| ] |
| - if (!is_debug || v8_optimized_debug) { |
| + # TODO(machenbach): This config doesn't affect executables and components. |
| + # It should be moved to a common place. |
| + if (is_debug && !v8_optimized_debug) { |
| + configs -= [ "//build/config/compiler:default_optimization" ] |
| + configs += [ "//build/config/compiler:no_optimize" ] |
| + } else { |
| configs -= [ "//build/config/compiler:default_optimization" ] |
| configs += [ "//build/config/compiler:optimize_max" ] |
| } |