-
Notifications
You must be signed in to change notification settings - Fork 8
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
Default flags and environment variables #14
Comments
Presumably some configuration file needs to be shipped with the |
I recall that most of this stuff isn't necessary in "normal" situations? At least it wasn't when building |
This likely has a lot of overlap with #28, notably #28 (comment) |
I think the current situation is a lot better than it was when the issue was written, largely due to Eric and Alex's work at the time. @harmou01 did some work to compare the flags and variables bootstrap and This only looked at very common targets. You might think there's lots of For completeness, these flags are all different between x.py and Cargo’s -Zbuild-std, but the differences are justifiable. Codegen (-C):
These flags are set by bootstrap, but they’re unstable so Cargo cannot: Std crate features are inherently unstable and so can’t currently be set by Cargo. Bootstrap sets a few, such as compiler-builtins-c, profiler/profiler_builtins, since it knows it has a C compiler and will generate PGO profiles. In general these need to be stabilised and then Cargo can go about exposing them or turning some on with its own knowledge. I found two hardcoded behaviours in Cargo that check
|
This issue is for working through the implementation issues for determining the default flags passed to
rustc
for the standard library.Currently the standard library is built in a relatively straightforward fashion, like any normal Cargo project. However, there are a number of extra
rustc
flags and environment variables that can be passed to different crates.The initial implementation will likely need to duplicate some of this logic, but long term I think it would be ideal to avoid duplicating it. We will need to explore how to avoid that. We may also want to consider if we ever want the user to be able to control some of these options.
The bulk of the logic is in
rustc.rs
with some additional incompile.rs
and elsewhere.The text was updated successfully, but these errors were encountered: