Skip to content

Commit

Permalink
Rollup merge of rust-lang#95901 - jyn514:remove-duplicate-aliases, r=…
Browse files Browse the repository at this point in the history
…Mark-Simulacrum

Remove duplicate aliases for `check codegen_{cranelift,gcc}` and fix `build codegen_gcc`

* Remove duplicate aliases
    Bootstrap already allows selecting these in `PathSet::has`, which allows
    any string that matches the end of a full path.

    I found these by adding `assert!(path.exists())` in `StepDescription::paths`.
    I think ideally we wouldn't have any aliases that aren't paths, but I've held
    off on enforcing that here since it may be controversial, I'll open a separate PR.

* Add `build compiler/rustc_codegen_gcc` as an alias for `CodegenBackend`

    These paths (`_cranelift` and `_gcc`) are somewhat misleading, since they
    actually tell bootstrap to build *all* codegen backends. But this seems like
    a useful improvement in the meantime.

cc ``@bjorn3`` ``@antoyo``
  • Loading branch information
Dylan-DPC authored Apr 11, 2022
2 parents 5bf0d4e + 4c14383 commit c641fed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,7 @@ impl Step for CodegenBackend {
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.paths(&[
"compiler/rustc_codegen_cranelift",
"rustc_codegen_cranelift",
"compiler/rustc_codegen_gcc",
"rustc_codegen_gcc",
])
run.paths(&["compiler/rustc_codegen_cranelift", "compiler/rustc_codegen_gcc"])
}

fn make_run(run: RunConfig<'_>) {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ impl Step for CodegenBackend {
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("compiler/rustc_codegen_cranelift")
run.paths(&["compiler/rustc_codegen_cranelift", "compiler/rustc_codegen_gcc"])
}

fn make_run(run: RunConfig<'_>) {
Expand Down

0 comments on commit c641fed

Please sign in to comment.