File tree 7 files changed +22
-8
lines changed
7 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 58
58
icu_versions = json .loads ((tools_path / 'icu' / 'icu_versions.json' ).read_text (encoding = 'utf-8' ))
59
59
maglev_enabled_architectures = ('x64' , 'arm' , 'arm64' )
60
60
61
+ # builtins may be removed later if they have been disabled by options
61
62
shareable_builtins = {'cjs_module_lexer/lexer' : 'deps/cjs-module-lexer/lexer.js' ,
62
63
'cjs_module_lexer/dist/lexer' : 'deps/cjs-module-lexer/dist/lexer.js' ,
63
- 'undici/undici' : 'deps/undici/undici.js'
64
+ 'undici/undici' : 'deps/undici/undici.js' ,
65
+ 'amaro/dist/index' : 'deps/amaro/dist/index.js'
64
66
}
65
67
66
68
# create option groups
@@ -2202,6 +2204,10 @@ def make_bin_override():
2202
2204
configure_inspector (output )
2203
2205
configure_section_file (output )
2204
2206
2207
+ # remove builtins that have been disabled
2208
+ if options .without_amaro :
2209
+ del shareable_builtins ['amaro/dist/index' ]
2210
+
2205
2211
# configure shareable builtins
2206
2212
output ['variables' ]['node_builtin_shareable_builtins' ] = []
2207
2213
for builtin , value in shareable_builtins .items ():
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ declare_args() {
20
20
" deps/cjs-module-lexer/lexer.js" ,
21
21
" deps/cjs-module-lexer/dist/lexer.js" ,
22
22
" deps/undici/undici.js" ,
23
+ " deps/amaro/dist/index.js" ,
23
24
]
24
25
}
25
26
Original file line number Diff line number Diff line change 466
466
}, {
467
467
'use_openssl_def%' : 0 ,
468
468
}],
469
- [ 'node_use_amaro=="true"' , {
470
- 'deps_files' : [
471
- 'deps/amaro/dist/index.js' ,
472
- ]
473
- } ]
474
469
],
475
470
},
476
471
Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ BuiltinLoader::BuiltinLoader()
50
50
AddExternalizedBuiltin (" internal/deps/undici/undici" ,
51
51
STRINGIFY (NODE_SHARED_BUILTIN_UNDICI_UNDICI_PATH));
52
52
#endif // NODE_SHARED_BUILTIN_UNDICI_UNDICI_PATH
53
+
54
+ #if HAVE_AMARO
55
+ #ifdef NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH
56
+ AddExternalizedBuiltin (" internal/deps/amaro/dist/index" ,
57
+ STRINGIFY (NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH));
58
+ #endif // NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH
59
+ #endif // HAVE_AMARO
53
60
}
54
61
55
62
bool BuiltinLoader::Exists (const char * id) {
Original file line number Diff line number Diff line change @@ -127,9 +127,11 @@ Metadata::Versions::Versions() {
127
127
cjs_module_lexer = CJS_MODULE_LEXER_VERSION;
128
128
uvwasi = UVWASI_VERSION_STRING;
129
129
130
+ #ifndef NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH
130
131
#if HAVE_AMARO
131
132
amaro = AMARO_VERSION;
132
133
#endif
134
+ #endif
133
135
134
136
#if HAVE_OPENSSL
135
137
openssl = GetOpenSSLVersion ();
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ namespace node {
27
27
#define NODE_HAS_RELEASE_URLS
28
28
#endif
29
29
30
- #if HAVE_AMARO
30
+ #if HAVE_AMARO && !defined(NODE_SHARED_BUILTIN_AMARO_DIST_INDEX_PATH)
31
31
#define NODE_VERSIONS_KEY_AMARO (V ) V(amaro)
32
32
#else
33
33
#define NODE_VERSIONS_KEY_AMARO (V )
Original file line number Diff line number Diff line change @@ -27,9 +27,12 @@ const expected_keys = [
27
27
] ;
28
28
29
29
const hasUndici = process . config . variables . node_builtin_shareable_builtins . includes ( 'deps/undici/undici.js' ) ;
30
+ const hasAmaro = process . config . variables . node_builtin_shareable_builtins . includes ( 'deps/amaro/dist/index.js' ) ;
30
31
31
32
if ( process . config . variables . node_use_amaro ) {
32
- expected_keys . push ( 'amaro' ) ;
33
+ if ( hasAmaro ) {
34
+ expected_keys . push ( 'amaro' ) ;
35
+ }
33
36
}
34
37
if ( hasUndici ) {
35
38
expected_keys . push ( 'undici' ) ;
You can’t perform that action at this time.
0 commit comments