Skip to content

./x test mir-opt does not rebuild sysroot when rustc changes #148132

@RalfJung

Description

@RalfJung

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

79966ae

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions