Introduce '-j' parameter for bootstrap.py
The bootstrap.py file currently lacks parameters related to setting the number of threads and parallel compilation.This CL modifies the bootstrap.py file for this issue. Bug:1405126 Change-Id: I21abc22b70f713a8c4d89c981d7e93ffe41c1b3f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4137674 Auto-Submit: Ho Cheung <uioptt24@gmail.com> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/main@{#1090002}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
39147c1d6d
commit
dcad2e56b5
@ -39,6 +39,7 @@ def main(argv):
|
||||
help='Do a debug build. Defaults to release build.')
|
||||
parser.add_option(
|
||||
'-o', '--output', help='place output in PATH', metavar='PATH')
|
||||
parser.add_option('-j', '--jobs', help='Number of jobs')
|
||||
parser.add_option('-s', '--no-rebuild', help='ignored')
|
||||
parser.add_option('--no-clean', help='ignored')
|
||||
parser.add_option('--gn-gen-args', help='Args to pass to gn gen --args')
|
||||
@ -122,8 +123,10 @@ def main(argv):
|
||||
|
||||
shutil.copy2(
|
||||
os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir)
|
||||
subprocess.check_call(
|
||||
[ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn'])
|
||||
cmd = [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn']
|
||||
if options.jobs:
|
||||
cmd += ['-j', str(options.jobs)]
|
||||
subprocess.check_call(cmd)
|
||||
shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path)
|
||||
|
||||
if not options.skip_generate_buildfiles:
|
||||
|
Reference in New Issue
Block a user