Sam James <[email protected]> writes:

>> Gnulib has code to get that on most (all?) platforms that you care
>> about. But I understand you want to minimize dependencies to make it
>> easier to build make without make.
>>
>
> FWIW, ninja defaults to nproc, but it does some magic like gnulib does
> to read cgroups cpu.max too.

The Gnulib function does the same nowadays. It was done so that 'nproc'
from Coreutils would be more useful in containers, for example. I guess
it would be useful for most programs, though.

>> If it were in my control, I probably wouldn't implement it for the
>> reasons you mention. E.g., I can build glibc with $(nproc) jobs, but
>> building LLVM with $(nproc) jobs will cause my system to hang due to a
>> lack of memory, requiring me to reboot.
>>
>
> I encourage you to try Steve: https://wiki.gentoo.org/wiki/Steve

It only works on Gentoo, right? Or maybe it is just easier to setup on
Gentoo?

I use mostly Fedora nowadays. Sometimes Debian for VMs and containers
since they have nice cross compiler packages.

I'll try to find some time to try Gentoo to experiment with that.

Thanks,
Collin

Reply via email to