-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix -jN
argument
#14971
Fix -jN
argument
#14971
Conversation
The previous check for the -j argument was not actually working. Therefore, the build always used 4 cores, unless when building with ninja when presumably the ninja default was used.
Without this ninja supposedely builds with the default of the system which is 10 for my 4 core, 8 thread CPU. With this argument, you can now actually set it. This has the benefit that the Gazebo plugins can be built with less cores in order to avoid running out of RAM.
Ninja does this automatically by default, can you limit it to Makefiles only? Personally I'd also prefer Make didn't do anything by default, but I avoid using it so should probably stay out of it. |
I agree that we want to use the ninja default when no |
It makes sense to trust ninja on selecting the number of cores. This is also sensible in order not to change existing setups.
@dagar good to merge now? |
Looks like CI is still failing. 😏 |
Actually, this one is real. http://ci.px4.io:8080/blue/organizations/jenkins/PX4%2FFirmware/detail/PR-14971/2/pipeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
It turns out the
-jN
argument was never actually used in the Makefile but always set to 4 for Makefile build. Ninja seemed to run with whatever is the system default.With this change both Makefile and Ninja builds will now adhere to the j argument if it is set.
This should allow to build the Gazebo plugins will less core in order not to run out of RAM.
Related to:
#14747
#14430
#14943