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 ab18c08

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 df435d3 commit ab18c08
Copy full SHA for ab18c08

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
@@ -922,7 +922,13 @@
922922
},
923923
}],
924924
[ 'node_builtin_modules_path!=""', {
925-
'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ]
925+
'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ],
926+
# When loading builtins from disk, JS source files do not need to
927+
# trigger rebuilds since the binary reads them at runtime.
928+
'sources!': [
929+
'<@(library_files)',
930+
'<@(deps_files)',
931+
],
926932
}],
927933
[ 'node_shared=="true"', {
928934
'sources': [
@@ -1067,6 +1073,16 @@
10671073
'<@(deps_files)',
10681074
'config.gypi'
10691075
],
1076+
'conditions': [
1077+
[ 'node_builtin_modules_path!=""', {
1078+
# When loading builtins from disk, JS source files do not need
1079+
# to trigger rebuilds since the binary reads them at runtime.
1080+
'inputs!': [
1081+
'<@(library_files)',
1082+
'<@(deps_files)',
1083+
],
1084+
}],
1085+
],
10701086
'outputs': [
10711087
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
10721088
],
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
@@ -72,7 +72,8 @@ const BuiltinSource* BuiltinLoader::AddFromDisk(const char* id,
7272
const std::string& filename,
7373
const UnionBytes& source) {
7474
BuiltinSourceType type = GetBuiltinSourceType(id, filename);
75-
auto result = source_.write()->emplace(id, BuiltinSource{id, source, type});
75+
auto result =
76+
source_.write()->insert_or_assign(id, BuiltinSource{id, source, type});
7677
return &(result.first->second);
7778
}
7879

0 commit comments

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