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");
39
39
function provideNinja ( ) {
40
40
var vendor_ninja_version = "1.9.0.git" ;
41
41
var ninja_source_dir = path . join ( root_dir , "vendor" , "ninja" ) ;
42
+
42
43
function build_ninja ( ) {
43
44
console . log ( `building ninja` ) ;
44
45
ensureExists ( ninja_source_dir ) ;
46
+
45
47
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.
46
50
console . log ( "Extracting ninja sources..." ) ;
47
51
child_process . execSync ( `tar xzf ../ninja.tar.gz` , {
48
52
cwd : ninja_source_dir ,
@@ -59,8 +63,8 @@ function provideNinja() {
59
63
ninja_bin_output
60
64
) ;
61
65
} 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" ) ;
64
68
fs . copyFileSync (
65
69
path . join ( root_dir , "ninja" , ninja_bin_filename ) ,
66
70
ninja_bin_output
You can’t perform that action at this time.
0 commit comments