mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
build: fix --node-builtin-modules-path
PR-URL: https://github.com/nodejs/node/pull/62115 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
1 parent
0250b436ee
commit
f0eea0f905
2 files changed
+19
-2
No files matched your search
@@ -948,7 +948,13 @@
|
||||
},
|
||||
}],
|
||||
[ 'node_builtin_modules_path!=""', {
|
||||
'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ]
|
||||
'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ],
|
||||
# When loading builtins from disk, JS source files do not need to
|
||||
# trigger rebuilds since the binary reads them at runtime.
|
||||
'sources!': [
|
||||
'<@(library_files)',
|
||||
'<@(deps_files)',
|
||||
],
|
||||
}],
|
||||
[ 'node_shared=="true"', {
|
||||
'sources': [
|
||||
@@ -1103,6 +1109,16 @@
|
||||
'<@(deps_files)',
|
||||
'config.gypi'
|
||||
],
|
||||
'conditions': [
|
||||
[ 'node_builtin_modules_path!=""', {
|
||||
# When loading builtins from disk, JS source files do not need
|
||||
# to trigger rebuilds since the binary reads them at runtime.
|
||||
'inputs!': [
|
||||
'<@(library_files)',
|
||||
'<@(deps_files)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
'outputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
|
||||
],
|
||||
|
||||
@@ -74,7 +74,8 @@ const BuiltinSource* BuiltinLoader::AddFromDisk(const char* id,
|
||||
const std::string& filename,
|
||||
const UnionBytes& source) {
|
||||
BuiltinSourceType type = GetBuiltinSourceType(id, filename);
|
||||
auto result = source_.write()->emplace(id, BuiltinSource{id, source, type});
|
||||
auto result =
|
||||
source_.write()->insert_or_assign(id, BuiltinSource{id, source, type});
|
||||
return &(result.first->second);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user