1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
description: respect specified number of parallel jobs while bootstrapping gn
author: Michael Gilbert <mgilbert@debian.org>
--- a/tools/gn/bootstrap/bootstrap.py
+++ b/tools/gn/bootstrap/bootstrap.py
@@ -47,6 +47,7 @@ def main(argv):
help='The directory in which to build gn, '
'relative to the src directory. (eg. out/Release)')
parser.add_option('-v', '--verbose', help='ignored')
+ parser.add_option('-j', '--jobs', help='Number of jobs')
parser.add_option(
'--skip-generate-buildfiles',
action='store_true',
@@ -121,8 +122,12 @@ 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'])
+ if options.jobs:
+ subprocess.check_call(
+ [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', '-j'+str(options.jobs), 'gn'])
+ else:
+ subprocess.check_call(
+ [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:
|