-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Changing profile.*.lto
in Cargo.toml shouldn't rebuild everything
#3244
Comments
I'd prefer to keep Cargo from parsing |
codegen-units is the same kind of thing, isn't it. Nothing needs to be rebuilt. In rustbuild, I would like it to not rebuild anything when |
We just ran into this one again. It seems that adding I think this should be considered a bug instead of a feature request. |
@jonas-schievink That sounds like a different issue. This issue is about changing the |
Since this was created, #8192 was merged which optimized LTO builds by doing work in dependencies that isn't needed. This makes LTO affect dependencies and not just the final artifact. There are times where sharing could occur which is being tracked in #8343. The lack of sharing can also cause surprising rebuilds like in #8762. rust-lang/rfcs#3310 was proposed as a general mechanism for specifying final-artifact-only rustflags. However, that was postpined. This is being tracked in #4349. |
Between LTO changing dependencies and the tracking of link-only arguments in #4349, I'm going to close this. |
Neither should adding, modifying or removing linker flags via
-C link-arg
or-C link-args
in.cargo/config
(build.rustflags
ortarget.*.rustflags
).These only affect the compilation of the top crate.
The text was updated successfully, but these errors were encountered: