`./x test mir-opt` does not rebuild sysroot when rustc changes
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Summary
./x test mir-opt does not rebuild sysroot when rustc changes. This used to work fine at some point; I don't know when it regressed.
Command used
./x test mir-opt -- build
# change rustc
./x test mir-opt -- build
Expected behaviour
This needs to rebuild the sysroot
Actual behaviour
Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.04s
/home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/ci-llvm/bin/llvm-strip does not exist; skipping copy
Building stage1 compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
Compiling rustc_mir_build v0.0.0 (/home/r/src/rust/rustc.2/compiler/rustc_mir_build)
Compiling rustc_mir_transform v0.0.0 (/home/r/src/rust/rustc.2/compiler/rustc_mir_transform)
Compiling rustc_interface v0.0.0 (/home/r/src/rust/rustc.2/compiler/rustc_interface)
Compiling rustc_driver_impl v0.0.0 (/home/r/src/rust/rustc.2/compiler/rustc_driver_impl)
Compiling rustc_driver v0.0.0 (/home/r/src/rust/rustc.2/compiler/rustc_driver)
Compiling rustc-main v0.0.0 (/home/r/src/rust/rustc.2/compiler/rustc)
Finished `release` profile [optimized + debuginfo] target(s) in 3.49s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 lld-wrapper (stage0 -> stage1, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized + debuginfo] target(s) in 0.06s
Building stage1 library artifacts (stage1 -> stage1, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized + debuginfo] target(s) in 0.02s
Building stage1 compiletest (stage0 -> stage1, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized + debuginfo] target(s) in 0.08s
Testing stage1 with compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu)
running 9 tests
In the following, things fail explosively since the sysroot was build with a different version of rustc than what we are now using for mir-opt...
Bootstrap configuration (bootstrap.toml)
[build]
# Reduce RAM consumption
jobs = 12
[rust]
# The safe & fast option.
download-rustc = "if-unchanged"
# Get `debug!`/`trace!` output and more sanity checks.
# FIXME: should be 'true' but then it doesn't download rustc...
debug-assertions = false
# Get actually-useful information from backtraces, profiling, etc. with minimal added bytes
debuginfo-level = "line-tables-only"
# Faster builds after small changes.
incremental = true
# Make the compiler and standard library faster to build, at the expense of a ~20% runtime slowdown.
lto = "off"
# Don't fail the build due to warnings.
deny-warnings = false
# Prints each test name as it is executed.
#verbose-tests = true
[llvm]
# Can't use "if-unchanged" as that makes bootstrap check out the submodule.
download-ci-llvm = true
Operating system
Debian testing
HEAD
79966ae420f38c5861d177356a3446023c090d6d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two ./x test mir-opt -- build runs described in the issue, changing rustc between them and comparing the stage1 sysroot behavior. Inspect the bootstrap path responsible for stage1 compiler and sysroot artifacts; done means the sysroot is rebuilt after rustc changes and the mir-opt suite no longer runs with a mismatched sysroot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100