summaryrefslogtreecommitdiff
path: root/configure.py
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2018-10-16 18:25:44 -0400
committerRefael Ackermann <refack@gmail.com>2018-10-31 12:12:07 -0400
commite9dc1ebb13d0f62817820fe8a288ed8eb4dad7ff (patch)
tree31af5281d92d48c0345d30cb42d0b251652cc891 /configure.py
parent56881b0d952312320ee6a27e40bd553152e11688 (diff)
downloadandroid-node-v8-e9dc1ebb13d0f62817820fe8a288ed8eb4dad7ff.tar.gz
android-node-v8-e9dc1ebb13d0f62817820fe8a288ed8eb4dad7ff.tar.bz2
android-node-v8-e9dc1ebb13d0f62817820fe8a288ed8eb4dad7ff.zip
build: configure default v8_optimized_debug
Under the assumption that debugging is more often focused on node core source. This setting compiles V8 with only partial optimizations, DCHECKS, and debug symbols, so it is still very much debuggable, but it is much faster. It does disable SLOW_DCHECKS, but at the advice of the V8 team, those are more important for deep V8 debugging. Override is configurable with `./configure --v8-non-optimized-debug`. PR-URL: https://github.com/nodejs/node/pull/23704 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index 5bc53630f3..05a7fbc4cc 100755
--- a/configure.py
+++ b/configure.py
@@ -566,6 +566,12 @@ parser.add_option('--verbose',
default=False,
help='get more output from this script')
+parser.add_option('--v8-non-optimized-debug',
+ action='store_true',
+ dest='v8_non_optimized_debug',
+ default=False,
+ help='compile V8 with minimal optimizations and with runtime checks')
+
# Create compile_commands.json in out/Debug and out/Release.
parser.add_option('-C',
action='store_true',
@@ -1138,7 +1144,7 @@ def configure_library(lib, output):
def configure_v8(o):
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
- o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds.
+ o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
o['variables']['v8_use_snapshot'] = 'false' if options.without_snapshot else 'true'