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
rustc: correct propagation of NIX_BUILD_CORES #38869
Conversation
Failure on x86_64-darwin (full log) Attempted: rustc Partial log (click to expand)
|
# The BOOTSTRAP_ARGS used by this Makefile must include all flags to pass | ||
# to the bootstrap builder. | ||
postConfigure = '' | ||
substituteInPlace Makefile --replace 'BOOTSTRAP_ARGS :=' 'BOOTSTRAP_ARGS := --jobs $(NIX_BUILD_CORES)' |
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.
Is this for the llvm build?
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.
Not familiar with the rust build chain, but AFAICT:
This will impact the number of cores used by the LLVM build. However, this change targets the args passed to the rustc bootstrap builder. Which has a "jobs" arg:
The docs do not explicitly state "only LLVM" but that seems to be the only build actually impacted. shrug
Specifically this modifies
Which is copied by the configure script to form the top level Makefile.
Though, now that I look at flags.rs closer: Maybe a "JOBS" env variable would work as well?
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.
I was asking about llvm specifically because I noticed that it does indeed use more resources than it's supposed to.
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.
Understood.
I did try this change using a simple JOBS
env variable. No such luck. Patching Makefile.in
is the only version I can get to work as expected.
Success on x86_64-linux (full log) Attempted: rustc Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: rustc Partial log (click to expand)
|
Also attempted to override the
BOOTSTRAP_ARGS
via makeFlags but did not have any success.Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)