File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,14 @@ var force_lib_rebuild = process.argv.includes("-force-lib-rebuild");
3939function provideNinja ( ) {
4040 var vendor_ninja_version = "1.9.0.git" ;
4141 var ninja_source_dir = path . join ( root_dir , "vendor" , "ninja" ) ;
42+
4243 function build_ninja ( ) {
4344 console . log ( `building ninja` ) ;
4445 ensureExists ( ninja_source_dir ) ;
46+
4547 if ( fs . existsSync ( path . join ( root_dir , "vendor" , "ninja.tar.gz" ) ) ) {
48+ // Build from source on installation of the npm package
49+ // for platforms where we don't provide a pre-built binary.
4650 console . log ( "Extracting ninja sources..." ) ;
4751 child_process . execSync ( `tar xzf ../ninja.tar.gz` , {
4852 cwd : ninja_source_dir ,
@@ -59,8 +63,8 @@ function provideNinja() {
5963 ninja_bin_output
6064 ) ;
6165 } else {
62- console . log ( `ninja.tar.gz not availble in CI mode` ) ;
63- require ( "../ninja/snapshot" ) . build ( ) ;
66+ // Build from source for "npm install" in local dev.
67+ require ( "../scripts/buildNinjaBinary" ) ;
6468 fs . copyFileSync (
6569 path . join ( root_dir , "ninja" , ninja_bin_filename ) ,
6670 ninja_bin_output
You can’t perform that action at this time.
0 commit comments