I can set number of threads for the build process using -j argument. For example, I have 4 cores +4 virtual. When I write: make -j8 the speed increases 4 times.
Is it possible to set that value as default? (For example, in Linux Gentoo, in config file, it’s possible to set this default value).
p.s. I have Arch Linux
Your question is not about threads, but processes (jobs) executed by make.
The simple, way to set this, when make is used from the console is adding:
to your
.profilefile.You can also use
setenv MAKEFLAGS '-j 8', butMAKEFLAGScan ignore this parameter in some scenarios, because keeping desired number of processes requires communicating with recursivemakecalls. Happily this method works with current versions of GNU Make.