Skip to content

--keep-stage-std stopped working #164798

Closed

Description

@RalfJung

Summary

--keep-stage-std stopped working. It worked fine last time I used it (a few weeks ago maybe?), so this is a regression. Having to wait an extra minute for the standard library to rebuild every time I change some detail in the interpreter slows down the edit-test cycle quite a lot.

Command used

./x test miri -- variadic
touch compiler/rustc_const_eval/src/interpret/call.rs
./x test miri --keep-stage-std 1 -- variadic

Expected behaviour

This should work fine.

Actual behaviour

Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.02s
skipping rustc download with `download-rustc = 'if-unchanged'` due to local changes
/home/r/src/rust/rustc/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_const_eval v0.0.0 (/home/r/src/rust/rustc/compiler/rustc_const_eval)
   Compiling rustc_mir_transform v0.0.0 (/home/r/src/rust/rustc/compiler/rustc_mir_transform)
   Compiling rustc_interface v0.0.0 (/home/r/src/rust/rustc/compiler/rustc_interface)
   Compiling rustc_driver_impl v0.0.0 (/home/r/src/rust/rustc/compiler/rustc_driver_impl)
   Compiling rustc_driver v0.0.0 (/home/r/src/rust/rustc/compiler/rustc_driver)
   Compiling rustc-main v0.0.0 (/home/r/src/rust/rustc/compiler/rustc)
    Finished `release` profile [optimized + debuginfo] target(s) in 5.30s
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.05s
Building stage1 miri (stage0 -> stage1, x86_64-unknown-linux-gnu)
   Compiling miri v0.1.0 (/home/r/src/rust/rustc/src/tools/miri)
    Finished `release` profile [optimized + debuginfo] target(s) in 12.68s
Building stage1 cargo-miri (stage0 -> stage1, x86_64-unknown-linux-gnu)
   Compiling cargo-miri v0.1.0 (/home/r/src/rust/rustc/src/tools/miri/cargo-miri)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.31s
Building stage2 miri sysroot (stage1 -> stage2, x86_64-unknown-linux-gnu)
A sysroot for Miri is already available in `/home/r/src/rust/rustc/build/x86_64-unknown-linux-gnu/miri-sysroot`.
WARNING: Using a potentially old libstd. This may not behave well.
ERROR: Unable to find the stamp file /home/r/src/rust/rustc/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/dist/.libstd-stamp, did you try to keep a nonexistent build stage?
Build completed unsuccessfully in 0:00:18

Bootstrap configuration (bootstrap.toml)

change-id = "ignore"

[build]
# Some cores are slower so returns diminish when we use all of them.
jobs = 16

[rust]
# The safe & fast option.
download-rustc = "if-unchanged"
# Get `debug!`/`trace!` output and more sanity checks.
# FIXME: disabled as otherwise it doesn't download rustc...
#debug-assertions = true
# 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
# (see https://github.com/rust-lang/rust/issues/146768).
download-ci-llvm = true

Operating system

Debian testing

Activity

  1. added
    T-bootstrap
    C-bug
    on Oct 23, 2026
  2. added
    needs-triage
    on Oct 23, 2026
  3. Kobzol commented on Oct 24, 2026

    @Kobzol
    Member

    The safe & fast option.

    download-rustc = "if-unchanged"

    Those are courageous words 😆 But it reproduces even without it.

    I broke this in #162413. Not sure why yet, will investigate.

  4. Kobzol commented on Oct 24, 2026

    @Kobzol
    Member

    Ok, found the issue. #164868 should fix it.

  5. removed
    needs-triage
    on Oct 24, 2026
  6. added a commit that references this issue on Oct 25, 2026
  7. added 2 commits that reference this issue on Oct 25, 2026
  8. added a commit that references this issue on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugT-bootstrap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions