summaryrefslogtreecommitdiff
path: root/configure.py
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2020-01-11 14:03:59 -0800
committerShelley Vohr <shelley.vohr@gmail.com>2020-02-17 11:46:54 -0800
commit03eade01d71bbb40b6b8cdfa0b9f3d8a9c3e4697 (patch)
tree7a92670b2609ca001c13e75b2e84082ffa7f7659 /configure.py
parentc8215699ab02abfc2849b0fcf579893cbab00303 (diff)
downloadnode-new-03eade01d71bbb40b6b8cdfa0b9f3d8a9c3e4697.tar.gz
build: enable loading internal modules from disk
PR-URL: https://github.com/nodejs/node/pull/31321 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/configure.py b/configure.py
index 682feb44e4..c5025c81eb 100755
--- a/configure.py
+++ b/configure.py
@@ -609,6 +609,12 @@ parser.add_option('--v8-non-optimized-debug',
default=False,
help='compile V8 with minimal optimizations and with runtime checks')
+parser.add_option('--node-builtin-modules-path',
+ action='store',
+ dest='node_builtin_modules_path',
+ default=False,
+ help='node will load builtin modules from disk instead of from binary')
+
# Create compile_commands.json in out/Debug and out/Release.
parser.add_option('-C',
action='store_true',
@@ -992,18 +998,18 @@ def configure_node(o):
o['variables']['want_separate_host_toolset'] = int(cross_compiling)
- if not options.without_node_snapshot:
+ if options.without_node_snapshot or options.node_builtin_modules_path:
+ o['variables']['node_use_node_snapshot'] = 'false'
+ else:
o['variables']['node_use_node_snapshot'] = b(
not cross_compiling and not options.shared)
- else:
- o['variables']['node_use_node_snapshot'] = 'false'
- if not options.without_node_code_cache:
+ if options.without_node_code_cache or options.node_builtin_modules_path:
+ o['variables']['node_use_node_code_cache'] = 'false'
+ else:
# TODO(refack): fix this when implementing embedded code-cache when cross-compiling.
o['variables']['node_use_node_code_cache'] = b(
not cross_compiling and not options.shared)
- else:
- o['variables']['node_use_node_code_cache'] = 'false'
if target_arch == 'arm':
configure_arm(o)
@@ -1145,6 +1151,10 @@ def configure_node(o):
else:
o['variables']['node_target_type'] = 'executable'
+ if options.node_builtin_modules_path:
+ print('Warning! Loading builtin modules from disk is for development')
+ o['variables']['node_builtin_modules_path'] = options.node_builtin_modules_path
+
def configure_napi(output):
version = getnapibuildversion.get_napi_version()
output['variables']['napi_build_version'] = version