Skip to content

Copy stage0 binaries into stage0-sysroot #101691

Closed
@jyn514

Description

@jyn514

Currently, the beta binaries are only present in build/stage0/bin; build/stage0-sysroot has only the standard library, not any binaries. That causes two issues:

  1. rustup toolchain link doesn't work with stage0-sysroot, meaning there's no way to change the standard library and use those changes at runtime without doing a full stage 1 build
  2. x dist --stage 0 doesn't work. This is very rare to want to do, but can be useful when modifying the dist process itself, to avoid long compile times.
thread 'main' panicked at 'could not read dir "/home/dawn/projects/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/bin": Os { code: 2, kind: NotFound, message: "No such file or directory" }', lib.rs:1573:25

Copying the binaries into stage0-sysroot is an easy way to fix both problems at once.

Mentoring instructions: Add a builder.copy call in impl Step for Sysroot

INTERNER.intern_path(sysroot)
which copies the whole bin directory from build/stage0.

Metadata

Metadata

Assignees

Labels

A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustE-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions