michaelforney / samurai

ninja-compatible build tool written in C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement `-l` option (job scheduling based on load average)

orbea opened this issue · comments

commented

Is there any reason samu does not support the -l argument as ninja does?

From ninja --help.

-l N do not start new jobs if the load average is greater than N

No reason other than I didn't implement it.

It would have to be guarded by an ifdef since getloadavg is non-POSIX.

commented

Thanks for the reply, I did not realize that about getloadavg. I'm fine with whatever you decide is best here, but I was curious as I was told this is part of the gentoo eclass for ninja and then noticed that samurai does not support it.

commented

@michaelforney Maybe it might be nice for at least the short term it would be implemented as a no-op and prints a short warning about not being implemented instead of outright failing? This might help compatibility with ninja.

I'm wondering if I'd have some time to implement it. The answer is probably yes. That wouldn't be very difficult.

I'm working in #50.