@@ -298,11 +298,13 @@ def compile(self):
298
298
configure = os .path .join (self .conf .repo_dir , 'configure' )
299
299
self .run (configure , * config_args )
300
300
301
+ argv = ['make' ]
301
302
if self .conf .pgo :
302
303
# FIXME: use taskset (isolated CPUs) for PGO?
303
- self .run ('make' , 'profile-opt' )
304
- else :
305
- self .run ('make' )
304
+ argv .append ('profile-opt' )
305
+ if self .conf .jobs :
306
+ argv .append ('-j%d' % self .conf .jobs )
307
+ self .run (* argv )
306
308
307
309
def install_python (self ):
308
310
program , _ = resolve_python (
@@ -778,6 +780,9 @@ def getboolean(section, key, default):
778
780
except KeyError :
779
781
return default
780
782
783
+ def getint (section , key , default = None ):
784
+ return int (getstr (section , key , default ))
785
+
781
786
# [config]
782
787
conf .json_dir = getfile ('config' , 'json_dir' )
783
788
conf .json_patch_dir = os .path .join (conf .json_dir , 'patch' )
@@ -796,6 +801,10 @@ def getboolean(section, key, default):
796
801
conf .pgo = getboolean ('compile' , 'pgo' , True )
797
802
conf .install = getboolean ('compile' , 'install' , True )
798
803
conf .pkg_only = getstr ('compile' , 'pkg_only' , '' ).split ()
804
+ try :
805
+ conf .jobs = getint ('compile' , 'jobs' )
806
+ except KeyError :
807
+ conf .jobs = None
799
808
800
809
# [run_benchmark]
801
810
conf .system_tune = getboolean ('run_benchmark' , 'system_tune' , True )
0 commit comments