Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f0eea0f

Browse filesBrowse files
panvaaduh95
authored andcommitted
build: fix --node-builtin-modules-path
PR-URL: #62115 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 0250b43 commit f0eea0f
Copy full SHA for f0eea0f

2 files changed

+19-2Lines changed: 19 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
+17-1Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,13 @@
948948
},
949949
}],
950950
[ 'node_builtin_modules_path!=""', {
951-
'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ]
951+
'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ],
952+
# When loading builtins from disk, JS source files do not need to
953+
# trigger rebuilds since the binary reads them at runtime.
954+
'sources!': [
955+
'<@(library_files)',
956+
'<@(deps_files)',
957+
],
952958
}],
953959
[ 'node_shared=="true"', {
954960
'sources': [
@@ -1103,6 +1109,16 @@
11031109
'<@(deps_files)',
11041110
'config.gypi'
11051111
],
1112+
'conditions': [
1113+
[ 'node_builtin_modules_path!=""', {
1114+
# When loading builtins from disk, JS source files do not need
1115+
# to trigger rebuilds since the binary reads them at runtime.
1116+
'inputs!': [
1117+
'<@(library_files)',
1118+
'<@(deps_files)',
1119+
],
1120+
}],
1121+
],
11061122
'outputs': [
11071123
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
11081124
],
Collapse file

‎src/node_builtins.cc‎

Copy file name to clipboardExpand all lines: src/node_builtins.cc
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ const BuiltinSource* BuiltinLoader::AddFromDisk(const char* id,
7474
const std::string& filename,
7575
const UnionBytes& source) {
7676
BuiltinSourceType type = GetBuiltinSourceType(id, filename);
77-
auto result = source_.write()->emplace(id, BuiltinSource{id, source, type});
77+
auto result =
78+
source_.write()->insert_or_assign(id, BuiltinSource{id, source, type});
7879
return &(result.first->second);
7980
}
8081

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.