Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand Down Expand Up @@ -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',
],
Expand Down
3 changes: 2 additions & 1 deletion src/node_builtins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Loading