@@ -298,11 +298,13 @@ def compile(self):
298298 configure = os .path .join (self .conf .repo_dir , 'configure' )
299299 self .run (configure , * config_args )
300300
301+ argv = ['make' ]
301302 if self .conf .pgo :
302303 # 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 )
306308
307309 def install_python (self ):
308310 program , _ = resolve_python (
@@ -778,6 +780,9 @@ def getboolean(section, key, default):
778780 except KeyError :
779781 return default
780782
783+ def getint (section , key , default = None ):
784+ return int (getstr (section , key , default ))
785+
781786 # [config]
782787 conf .json_dir = getfile ('config' , 'json_dir' )
783788 conf .json_patch_dir = os .path .join (conf .json_dir , 'patch' )
@@ -796,6 +801,10 @@ def getboolean(section, key, default):
796801 conf .pgo = getboolean ('compile' , 'pgo' , True )
797802 conf .install = getboolean ('compile' , 'install' , True )
798803 conf .pkg_only = getstr ('compile' , 'pkg_only' , '' ).split ()
804+ try :
805+ conf .jobs = getint ('compile' , 'jobs' )
806+ except KeyError :
807+ conf .jobs = None
799808
800809 # [run_benchmark]
801810 conf .system_tune = getboolean ('run_benchmark' , 'system_tune' , True )
0 commit comments