Skip to content

Commit

Permalink
Add a default filter for library/std if there are no filters
Browse files Browse the repository at this point in the history
- Add an opt-in way to build all tools with `x.py build src/tools`
- Add an entry in the changelog
- Bump the major version
  • Loading branch information
jyn514 committed Oct 3, 2020
1 parent 7820135 commit 4145189
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/bootstrap/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

None.

## [Version 3] - 2020-10-03

- `x.py build` no longer builds tools by default. If you want all tools, use `build src/tools`. If you want only the default tools from before, specify them one by one: `x.py build src/tools/{rustdoc,cargo,...}`. [#77489](https://github.com/rust-lang/rust/pull/77489)

## [Version 2] - 2020-09-25

- `host` now defaults to the value of `build` in all cases
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn main() {
}

fn check_version(config: &Config) -> Option<String> {
const VERSION: usize = 2;
const VERSION: usize = 3;

let mut msg = String::new();

Expand Down
7 changes: 6 additions & 1 deletion src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,12 @@ Arguments:
}

let cmd = match subcommand.as_str() {
"build" | "b" => Subcommand::Build { paths },
"build" | "b" => {
if paths.is_empty() {
paths.push(PathBuf::from("library/std"));
}
Subcommand::Build { paths }
}
"check" | "c" => Subcommand::Check { paths },
"clippy" => Subcommand::Clippy { paths },
"fix" => Subcommand::Fix { paths },
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ macro_rules! bootstrap_tool {
type Output = PathBuf;

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

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

0 comments on commit 4145189

Please sign in to comment.