Skip to content

Commit

Permalink
Change paths for dist command to match the components they generate
Browse files Browse the repository at this point in the history
Before, you could have the confusing situation where the command to
generate a component had no relation to the name of that component (e.g.
the `rustc` component was generated with `src/librustc`). This changes
the name to make them match up.
  • Loading branch information
jyn514 committed Nov 11, 2021
1 parent 82af160 commit 3366327
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- `llvm-libunwind` now accepts `in-tree` (formerly true), `system` or `no` (formerly false) [#77703](https://github.com/rust-lang/rust/pull/77703)
- The options `infodir`, `localstatedir`, and `gpg-password-file` are no longer allowed in config.toml. Previously, they were ignored without warning. Note that `infodir` and `localstatedir` are still accepted by `./configure`, with a warning. [#82451](https://github.com/rust-lang/rust/pull/82451)
- Add options for enabling overflow checks, one for std (`overflow-checks-std`) and one for everything else (`overflow-checks`). Both default to false.
- Change the names for `dist` commmands to match the component they generate. [#90684](https://github.com/rust-lang/rust/pull/90684)

### Non-breaking changes

Expand Down
18 changes: 9 additions & 9 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Step for Docs {

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let default = run.builder.config.docs;
run.path("src/doc").default_condition(default)
run.path("rust-docs").default_condition(default)
}

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

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.never()
run.path("rust-mingw")
}

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

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

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

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("library/std")
run.path("rust-std")
}

fn make_run(run: RunConfig<'_>) {
Expand Down Expand Up @@ -686,7 +686,7 @@ impl Step for Analysis {

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let default = should_build_extended_tool(&run.builder, "analysis");
run.path("analysis").default_condition(default)
run.path("rust-analysis").default_condition(default)
}

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

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src")
run.path("rust-src")
}

fn make_run(run: RunConfig<'_>) {
Expand Down Expand Up @@ -874,7 +874,7 @@ impl Step for PlainSourceTarball {

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
run.path("src").default_condition(builder.config.rust_dist_src)
run.path("rustc-src").default_condition(builder.config.rust_dist_src)
}

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

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/tools/build-manifest")
run.path("build-manifest")
}

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

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("reproducible")
run.path("reproducible-artifacts")
}

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

0 comments on commit 3366327

Please sign in to comment.