Repository navigation
x.py dist followed by x.py build compiler/rustc causes rustc to be rebuilt #97481
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
Observed behavior:
$ ./x.py dist --stage 1
Updating only changed submodules
Submodules updated in 0.00 seconds
Building rustbuild
Finished dev [unoptimized] target(s) in 0.09s
Generating unstable book md files (x86_64-unknown-linux-gnu)
Building stage0 tool unstable-book-gen (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.09s
Building stage0 tool rustbook (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.11s
Rustbook (x86_64-unknown-linux-gnu) - unstable-book
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.09s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.14s
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Assembling stage1 compiler (x86_64-unknown-linux-gnu)
Documenting standalone (x86_64-unknown-linux-gnu)
Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.10s
Documenting book redirect pages (x86_64-unknown-linux-gnu)
Documenting stage1 std (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.15s
Finished release [optimized] target(s) in 0.13s
Finished release [optimized] target(s) in 0.16s
Finished release [optimized] target(s) in 0.12s
Finished release [optimized] target(s) in 0.12s
Documenting error index (x86_64-unknown-linux-gnu)
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.09s
Copying stage1 std from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage1 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.13s
Copying stage1 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
[...]
Build completed successfully in 0:04:52
$ ./x.py build --stage 1 compiler/rustc
Updating only changed submodules
Submodules updated in 0.01 seconds
Building rustbuild
Finished dev [unoptimized] target(s) in 0.09s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.09s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Compiling jemalloc-sys v0.5.0+5.3.0
^C Building [=======================> ] 239/242: jemalloc-sys(build)
Expected behavior: The build should use the cached artifacts
Tested on b97bfc3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Activity
jyn514 commentedon Jul 10, 2022
This looks suspicious:
rust/src/bootstrap/builder.rs
Lines 723 to 727 in c396bb3
#93033
jyn514 commentedon Jul 11, 2022
Oh, this might just be because we create a
.cargo/config.tomlfile that uses vendored sources? @the8472 if you delete.cargo, does it fix your issue? (Trying to test this locally, butcargo vendoris painfully slow unfortunately ...)jyn514 commentedon Jul 11, 2022
I wasn't able to replicate this. (The vendoring changed in #97513; maybe that fixed it by accident?)
jyn514 commentedon Sep 19, 2022
@the8472 are you still running into this problem?
RodBurman commentedon Apr 13, 2026
Over 3.5 years later and no more comments or reports of problems, does that mean we should close this issue?
Kobzol commentedon Aug 25, 2026
No longer happens on
main.