Package: chromium-browser / 70.0.3538.110-1~deb9u1

gn/parallel.patch Patch series | download
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
@@ -51,6 +51,7 @@ def main(argv):
       action='store_true',
       help='Download and build with the Debian sysroot.')
   parser.add_option('-v', '--verbose', help='ignored')
+  parser.add_option('-j', '--jobs', help='Number of jobs')
   options, args = parser.parse_args(argv)
   if args:
     parser.error('Unrecognized command line arguments: %s.' % ', '.join(args))
@@ -77,8 +78,12 @@ def main(argv):
 
   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'])
+  if options.jobs:
+    subprocess.check_call(
+        ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err', '-j'+str(options.jobs)])
+  else:
+    subprocess.check_call(
+        ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err'])
   shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path)