Closed
Description
Say you are working on libcore, did some changes and now want to see of the test suite still passes. So you do
./x.py --stage 1 test src/libcore
Unfortunately, even if all changes are inside libcore, this leads to the entire stage0 rustc being rebuilt. So, this takes forever.
So, instead I am told I should do
./x.py --stage 1 --keep-stage 0 test src/libcore
But that fails:
$ nice ./x.py --stage 1 --keep-stage 0 test src/libcore
Updating only changed submodules
Submodules updated in 0.03 seconds
Finished dev [unoptimized] target(s) in 0.21s
Warning: Using a potentially old librustc. This may not behave well.
Warning: Using a potentially old libtest. This may not behave well.
Warning: Using a potentially old librustc. This may not behave well.
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 codegen artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu, llvm)
Finished release [optimized] target(s) in 0.23s
Assembling stage1 compiler (x86_64-unknown-linux-gnu)
Warning: Using a potentially old libtest. This may not behave well.
Copying stage1 test from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.20s
Testing core stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Compiling core v0.0.0 (file:///home/r/src/rust/rustc/src/libcore)
/home/r/src/rust/rustc/build/x86_64-unknown-linux-gnu/stage1/bin/rustc: error while loading shared libraries: libstd-dca726f5ff6a5f1b.so: cannot open shared object file: No such file or directory
error: Could not compile `core`.
To learn more, run the command again with --verbose.
command did not execute successfully: "/home/r/src/rust/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "8" "--release" "--features" "panic-unwind debug-jemalloc jemalloc backtrace" "--manifest-path" "/home/r/src/rust/rustc/src/libstd/Cargo.toml" "-p" "core" "--" "--quiet"
expected success, got: exit code: 101
failed to run: /home/r/src/rust/rustc/build/bootstrap/debug/bootstrap --stage 1 --keep-stage 0 test src/libcore
Build completed unsuccessfully in 0:00:01
(EDIT: Originally I thought this was a missing feature, but it really is a bug in --keep-stage
.)