Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index 58bdb6b6531c57afdfcd02c606e5c8e9584a604e..bcd3c45175b401448dc7ec1022fb5fa683682210 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -21,7 +21,7 @@ declare_args() { |
v8_android_log_stdout = false |
# Sets -DVERIFY_HEAP. |
- v8_enable_verify_heap = false |
+ v8_enable_verify_heap = "" |
# Sets -DVERIFY_PREDICTABLE |
v8_enable_verify_predictable = false |
@@ -54,6 +54,12 @@ declare_args() { |
# Sets -dOBJECT_PRINT. |
v8_object_print = "" |
+ # Sets -dTRACE_MAPS. |
+ v8_enable_trace_maps = "" |
+ |
+ # Sets -dV8_ENABLE_CHECKS. |
+ v8_enable_v8_checks = "" |
Michael Achenbach
2017/01/13 14:34:06
How about just calling it v8_enable_checks just li
Igor Sheludko
2017/01/13 16:04:59
Given the flags naming scheme (v8_enable_blah_blah
Michael Achenbach
2017/01/13 16:17:49
Acknowledged.
|
+ |
# 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. |
@@ -90,12 +96,21 @@ if (v8_enable_gdbjit == "") { |
} |
# Derived defaults. |
+if (v8_enable_verify_heap == "") { |
+ v8_enable_verify_heap = is_debug |
+} |
if (v8_object_print == "") { |
Michael Achenbach
2017/01/13 14:34:06
object_print, enable_disassembler and trace_maps w
Igor Sheludko
2017/01/13 16:04:59
Good point. Done.
|
v8_object_print = is_debug && !v8_optimized_debug |
} |
if (v8_enable_disassembler == "") { |
v8_enable_disassembler = is_debug && !v8_optimized_debug |
} |
+if (v8_enable_trace_maps == "") { |
+ v8_enable_trace_maps = is_debug && !v8_optimized_debug |
+} |
+if (v8_enable_v8_checks == "") { |
+ v8_enable_v8_checks = is_debug |
+} |
# Specifies if the target build is a simulator build. Comparing target cpu |
# with v8 target cpu to not affect simulator builds for making cross-compile |
@@ -189,6 +204,12 @@ config("features") { |
if (v8_enable_verify_predictable) { |
defines += [ "VERIFY_PREDICTABLE" ] |
} |
+ if (v8_enable_trace_maps) { |
+ defines += [ "TRACE_MAPS" ] |
+ } |
+ if (v8_enable_v8_checks) { |
+ defines += [ "V8_ENABLE_CHECKS" ] |
+ } |
if (v8_interpreted_regexp) { |
defines += [ "V8_INTERPRETED_REGEXP" ] |
} |
@@ -352,15 +373,7 @@ config("toolchain") { |
ldflags += [ "-rdynamic" ] |
} |
- # TODO(jochen): Add support for different debug optimization levels. |
- defines += [ |
- "ENABLE_DISASSEMBLER", |
- "V8_ENABLE_CHECKS", |
- "OBJECT_PRINT", |
- "VERIFY_HEAP", |
- "DEBUG", |
- "TRACE_MAPS", |
- ] |
+ defines += [ "DEBUG" ] |
if (v8_enable_slow_dchecks) { |
defines += [ "ENABLE_SLOW_DCHECKS" ] |
} |