-
Notifications
You must be signed in to change notification settings - Fork 2k
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
make: pass make jobserver to cargo #19203
Conversation
While I generally subscribe to "Comments should assume the user knows the language", not only is this the first time I see Given that |
And: Can this go away again when #19045 is fixed? (If so, the comment should say so too). |
9c7fd1f
to
6fb226d
Compare
I added one. Here's an explanation of the jobserver: https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html
Nope. If the "+" is not used, make passes invalid fds, hinting the jobserver is unavailable / should not be used.
hm, |
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.
Works as advertised. Thanks for fixing this!
bors merge |
🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
Build succeeded: |
Contribution description
For cargo to honour our make's jobserver, it's recipe line needs to be prefixed with
+
.Make >= 4.4 currently also needs the
--jobserver-style=pipe
argument. (Our CI is using 4.3).Testing procedure
make -Ctests/rust-hello-world clean all -j2
On master, observe as many rustc processes (e.g., in top) as there are CPUs. With this PR, there should only be two.
(should your system have make 4.4, try
make --jobserver-style=pipe -Ctests/rust-hello-world clean all -j2
)Issues/PRs references
Fixes #19045.