File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,23 @@ async function compileNode (
210
210
configure . push ( '--link-module' , module ) ;
211
211
}
212
212
await spawnBuildCommand ( configure , options ) ;
213
+ if ( configure . includes ( '--fully-static' ) || configure . includes ( '--partly-static' ) ) {
214
+ // https://github.com/nodejs/node/issues/41497#issuecomment-1013137433
215
+ for ( const file of [
216
+ 'out/tools/v8_gypfiles/gen-regexp-special-case.target.mk' ,
217
+ 'out/test_crypto_engine.target.mk'
218
+ ] ) {
219
+ const target = path . join ( sourcePath , file ) ;
220
+ try {
221
+ await fs . stat ( target ) ;
222
+ } catch {
223
+ continue ;
224
+ }
225
+ let source = await fs . readFile ( target , 'utf8' ) ;
226
+ source = source . replace ( / - s t a t i c / g, '' ) ;
227
+ await fs . writeFile ( target , 'utf8' ) ;
228
+ }
229
+ }
213
230
214
231
const make = [ 'make' , ...makeArgs ] ;
215
232
if ( ! make . some ( ( arg ) => / ^ - j / . test ( arg ) ) ) { make . push ( `-j${ cpus } ` ) ; }
You can’t perform that action at this time.
0 commit comments