Skip to content

Commit e562727

Browse files
bnoordhuisevanlucas
authored andcommitted
build: add --enable-d8 configure option
Add an option to the configure script for building d8. Useful for testing V8 standalone. PR-URL: #7538 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent 933ff62 commit e562727

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

configure

+13-2
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ parser.add_option('--release-urlbase',
248248
'`sourceUrl` and `headersUrl`. When compiling a release build, this '
249249
'will default to https://nodejs.org/download/release/')
250250

251+
parser.add_option('--enable-d8',
252+
action='store_true',
253+
dest='enable_d8',
254+
help=optparse.SUPPRESS_HELP) # Unsupported, undocumented.
255+
251256
parser.add_option('--v8-options',
252257
action='store',
253258
dest='v8_options',
@@ -835,8 +840,6 @@ def configure_node(o):
835840

836841
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
837842
o['variables']['node_shared'] = b(options.shared)
838-
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
839-
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
840843
o['variables']['node_module_version'] = int(getmoduleversion.get_version())
841844

842845
if options.linked_module:
@@ -884,6 +887,14 @@ def configure_v8(o):
884887
o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds.
885888
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
886889
o['variables']['v8_use_snapshot'] = 'false' if options.without_snapshot else 'true'
890+
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
891+
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
892+
o['variables']['node_enable_d8'] = b(options.enable_d8)
893+
if options.enable_d8:
894+
o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp.
895+
if options.without_bundled_v8 and options.enable_d8:
896+
raise Exception('--enable-d8 is incompatible with --without-bundled-v8.')
897+
887898

888899
def configure_openssl(o):
889900
o['variables']['node_use_openssl'] = b(not options.without_ssl)

node.gyp

+3
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@
248248
}]
249249
],
250250
}],
251+
[ 'node_enable_d8=="true"', {
252+
'dependencies': [ 'deps/v8/src/d8.gyp:d8' ],
253+
}],
251254
[ 'node_use_bundled_v8=="true"', {
252255
'include_dirs': [
253256
'deps/v8', # include/v8_platform.h

0 commit comments

Comments
 (0)