Skip to content

Investigate if download-rustc rustc-dev sysroot copy quirk is still a thing #156525

@jieyouxu

Description

@jieyouxu

See #t-infra/bootstrap > x run rustfmt works but x test rustfmt fails to compile.

// Copy the compiler into the correct sysroot.
// NOTE(#108767): We intentionally don't copy `rustc-dev` artifacts until they're requested with `builder.ensure(Rustc)`.
// This fixes an issue where we'd have multiple copies of libc in the sysroot with no way to tell which to load.
// There are a few quirks of bootstrap that interact to make this reliable:
// 1. The order `Step`s are run is hard-coded in `builder.rs` and not configurable. This
// avoids e.g. reordering `test::UiFulldeps` before `test::Ui` and causing the latter to
// fail because of duplicate metadata.
// 2. The sysroot is deleted and recreated between each invocation, so running `x test
// ui-fulldeps && x test ui` can't cause failures.
let mut filtered_files = Vec::new();
let mut add_filtered_files = |suffix, contents| {

Metadata

Metadata

Assignees

Labels

A-download-rustcArea: The `rust.download-rustc` build option.C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-needs-investigationCall for participation: This issues needs some investigation to determine current statusT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions