-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Enabling LTO causes spurious rebuilds #8750
Comments
As suggested in #8337, I can run
The interesting line appears to be:
But I'm not sure how to address this. |
Thanks for the report! I believe this has already been fixed via #8657. Can you try with beta (1.47) to confirm? |
I can confirm that it is fixed in Beta (1.47). Thank you for finding that fix, and it's nice to know what's causing it. |
Problem
With LTO set to
thin
orfat
, doing acargo build --target riscv32imac-unknown-none-elf
followed bycargo run
followed bycargo build --target riscv32imac-unknown-none-elf
causes Cargo to rebuild some packages even when nothing has changed.Setting
lto="off"
prevents this behavior.Steps
riscv32imac-unknown-none-elf
toolchainxous-core
repositoryshell
shell
This series of steps should demonstrate the problem:
Notes
If you modify
Cargo.toml
to removelto="thin"
, or change it tolto="off
", then the issue goes away.Output of
cargo version
: cargo 1.46.0 (149022b 2020-07-17)This may be due to the fact that
cargo run
andcargo build
are targeting different architectures.The text was updated successfully, but these errors were encountered: