diff --git a/configure.py b/configure.py index 7dcfa9dface9d7..7d33c00f1ed984 100755 --- a/configure.py +++ b/configure.py @@ -628,6 +628,12 @@ default=None, help=argparse.SUPPRESS) # Unsupported, undocumented. +parser.add_argument('--enable-v8windbg', + action='store_true', + dest='enable_v8windbg', + default=None, + help=argparse.SUPPRESS) # Undocumented. + parser.add_argument('--enable-trace-maps', action='store_true', dest='trace_maps', @@ -1798,10 +1804,13 @@ def configure_v8(o, configs): o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) o['variables']['force_dynamic_crt'] = 1 if options.shared else 0 o['variables']['node_enable_d8'] = b(options.enable_d8) + o['variables']['node_enable_v8windbg'] = b(options.enable_v8windbg) if options.enable_d8: o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp. if options.without_bundled_v8 and options.enable_d8: raise Exception('--enable-d8 is incompatible with --without-bundled-v8.') + if options.without_bundled_v8 and options.enable_v8windbg: + raise Exception('--enable-v8windbg is incompatible with --without-bundled-v8.') if options.static_zoslib_gyp: o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp if flavor != 'linux' and options.v8_enable_hugepage: diff --git a/node.gypi b/node.gypi index 5ce22a3102c82c..de1fb74dbf48ca 100644 --- a/node.gypi +++ b/node.gypi @@ -85,6 +85,9 @@ [ 'node_enable_d8=="true"', { 'dependencies': [ 'tools/v8_gypfiles/d8.gyp:d8' ], }], + [ 'node_enable_v8windbg=="true"', { + 'dependencies': [ 'tools/v8_gypfiles/v8windbg.gyp:build_v8windbg' ], + }], [ 'node_use_bundled_v8=="true"', { 'dependencies': [ 'tools/v8_gypfiles/v8.gyp:v8_snapshot', diff --git a/tools/v8_gypfiles/v8windbg.gyp b/tools/v8_gypfiles/v8windbg.gyp new file mode 100644 index 00000000000000..13d4306f224ecf --- /dev/null +++ b/tools/v8_gypfiles/v8windbg.gyp @@ -0,0 +1,168 @@ +{ + 'variables': { + 'V8_ROOT': '../../deps/v8', + 'v8_code': 1, + }, + 'includes': ['toolchain.gypi', 'features.gypi'], + 'targets': [ + { + # Intermediate target to build v8windbg.dll. + # This prevents the dependent settings like node.gypi to link the v8windbg.dll + # to the dependent. v8windbg.dll is only supposed to be loaded by WinDbg at debug time. + 'target_name': 'build_v8windbg', + 'type': 'none', + 'hard_dependency': 1, + 'dependencies': [ + 'v8windbg', + ], + }, # build_v8windbg + { + 'target_name': 'v8windbg', + 'type': 'shared_library', + 'include_dirs': [ + '<(V8_ROOT)', + '<(V8_ROOT)/include', + ], + 'dependencies': [ + 'v8_debug_helper', + 'v8.gyp:v8_libbase', + ], + 'sources': [ + '