Duplicate of#131437
Description
To reproduce:
./x.py test ui -- mir
# The next command should not have to build a new standard library,
# since it was already built. And yet, a rebuild happens.
./x.py test mir-opt
# Another rebuild happens here
./x.py test ui -- mir
Cc @saethlin this may be related to the special hacks the mir-opt test suite uses for standard libraries for other targets.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
onur-ozkan commentedon Aug 2, 2024
The cache gets broken due to using different
rustflags
in the following code:rust/src/bootstrap/src/core/build_steps/compile.rs
Lines 239 to 265 in 05e692a
-Zalways-encode-mir
directly but in the second block it uses std_cargo to handlerustflags
(and other cargo-specific environment variables).jieyouxu commentedon Apr 2, 2025
Triage: I believe this was later superseded by #131437.
./x test mir-opt
rebuilds std every time #131437xry111 commentedon Apr 2, 2025
#131437 was closed months ago but IIRC this still happens with rustc-1.85.0.
jieyouxu commentedon Apr 2, 2025
I'm not observing the rebuild locally, please open a new issue with repro steps if you can still repro on latest nightly.