-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Bootstraping ignores make jobserver #116101
Comments
Unfortunately, due to numerious problems achieving this 100% during the bootstrapping process is not possible. However, there is a workaround provided in this PR: #116108, which allows you to set the cargo jobs to the value provided to Make using
The PR linked above should resolve this problem. |
Thanks but that doesn't solve the issue. When I do a build in OpenWrt, I am often building many packages, not just Rust. If we just give the same |
I thought you were only building rust from make, I see now. Thanks for clarification.
I assume the patch was removing those lines, right? |
Yes. I removed the lines from |
Then this
means the real issue is more related with cargo itself. |
We can remove Lines 1246 to 1248 in 70a7fe1
lines once
is fixed from cargo side(I haven't tested it, so I added the |
I'm able to have cargo use the same make jobserver (to build other Rust packages) after rustc is compiled/installed (cargo is called directly from the Makefile), so I would say that bootstrap is at least involved in this issue, if not the main cause. |
I'm currently working on enhancing the Rust package (currently 1.72.0) in OpenWrt (the build system is based on buildroot). After ensuring the x.py command is prefixed with
+
and thatMAKEFLAGS
is set correctly, bootstraping continues to use all of my CPUs instead of the-jN
jobs from the make command line.I have tried patching out these lines that remove
MAKEFLAGS
from the environment for cargo; theMAKEFLAGS
value does reach cargo but cargo continues to set up its own jobserver instead.I can see that removing
MAKEFLAGS
from the environment was deliberate (as noted in #50629 (comment)), but it would be great if building rustc can cooperate with the rest of the build system by using the same jobserver.The text was updated successfully, but these errors were encountered: