Skip to content

Add x {check,build,doc} {compiler,library} aliases. #95504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Step for Std {
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.all_krates("test")
run.all_krates("test").path("library")
}

fn make_run(run: RunConfig<'_>) {
Expand Down Expand Up @@ -162,7 +162,7 @@ impl Step for Rustc {
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.all_krates("rustc-main")
run.all_krates("rustc-main").path("compiler")
}

fn make_run(run: RunConfig<'_>) {
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Step for Std {
// When downloading stage1, the standard library has already been copied to the sysroot, so
// there's no need to rebuild it.
let download_rustc = run.builder.config.download_rustc;
run.all_krates("test").default_condition(!download_rustc)
run.all_krates("test").path("library").default_condition(!download_rustc)
}

fn make_run(run: RunConfig<'_>) {
Expand Down Expand Up @@ -1047,7 +1047,7 @@ impl Step for Assemble {
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("compiler/rustc")
run.path("compiler/rustc").path("compiler")
}

fn make_run(run: RunConfig<'_>) {
Expand Down
7 changes: 5 additions & 2 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ impl Step for Std {

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
run.all_krates("test").default_condition(builder.config.docs)
run.all_krates("test").path("library").default_condition(builder.config.docs)
}

fn make_run(run: RunConfig<'_>) {
Expand Down Expand Up @@ -479,11 +479,14 @@ impl Step for Std {
.iter()
.map(components_simplified)
.filter_map(|path| {
if path.get(0) == Some(&"library") {
if path.len() >= 2 && path.get(0) == Some(&"library") {
// single crate
Some(path[1].to_owned())
} else if !path.is_empty() {
// ??
Some(path[0].to_owned())
} else {
// all library crates
None
}
})
Expand Down