Patch by Michael Forney Already merged https://chromium-review.googlesource.com/c/chromium/src/+/1975453 --- tools/gn/bootstrap/bootstrap.py +++ tools/gn/bootstrap/bootstrap.py @@ -70,6 +70,7 @@ out_dir = os.path.join(SRC_ROOT, build_rel) gn_path = options.output or os.path.join(out_dir, 'gn') gn_build_dir = os.path.join(out_dir, 'gn_build') + ninja_binary = os.environ.get('NINJA', 'ninja') # TODO(thomasanderson): Remove this once Ubuntu Trusty reaches EOL, or when # Chromium's infrastructure is upgraded from Trusty to Xenial, whichever comes @@ -90,7 +91,7 @@ os.environ.get('CFLAGS', '').split() + os.environ.get('CXXFLAGS', '').split()), ]) + '\n') - subprocess.check_call(['ninja', '-C', libcxx_dir]) + subprocess.check_call([ninja_binary, '-C', libcxx_dir]) shutil.copy2(os.path.join(gn_build_dir, 'libc++.gn.so'), out_dir) def append_to_env(var, vals): @@ -120,7 +121,7 @@ shutil.copy2( os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir) subprocess.check_call( - ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err']) + [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn']) shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path) if not options.skip_generate_buildfiles: