-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Building for host architecture and then another target invalidates cache #10839
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
Comments
Thanks for the report! Can you please provide a complete reproduction? That shouldn't happen, and I'm unable to reproduce it with a typical project. |
In my .cargo/config.toml I have: [target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/mold"] Without the above cargo works as expected. A simpler version of the config.toml would be something like: [target.x86_64-unknown-linux-gnu]
rustflags = ["-O"] Also I should mention that |
Ah, specifying rustflags will indeed cause a difference here. There are two points:
|
@ehuss I'm seeing this issue with multiple build targets and the same non-default RUSTFLAGS across those targets. |
This is still an issue. |
Closing as a duplicate of the two issues linked above. This is just something that cargo does not support at this time. |
Currently we force the usage of the host target triple due to a Cargo cache issue (rust-lang/cargo#10839) but seems like it is not affecting us anymore.
Problem
cargo build
and wait for the build to finishcargo build --target <target triple>
for a few secondscargo build
again, the build restarts from scratchI would expect step 3 to not rebuild from scratch and instead use the cached artifacts produced in step 1.
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: