Speed up build phase with "make -j"

Anders F Björklund afb at macports.org
Tue Oct 30 04:13:00 PDT 2007


> I'd rather encourage a mechanism for port that provides a mechanism 
> for port authors to know how many processors there are and to enable 
> parallel builds if they know this to work.
> Perhaps a switch "use_parallel_build [yes|no]" that will add "-j 
> 2*CPUS" to build.args.

There's a bunch of other influences, such as number of cores and amount 
of RAM and whether the build is using some bloated language like C++ 
and many other considerations, for the -j parameter.

So in the end I just made it an integer (build.jobs), and left the 
heuristics up to the user :-)

--anders

PS. There's also a build.nice, if you want to go the other route (build 
slower, like in background)



More information about the macports-dev mailing list