Skip to content
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

Add a default filter for library/std to build if there are no filters #77489

Closed
wants to merge 1 commit into from
Closed
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: 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is worth a major change -- it will build strictly less than before, right? People don't need to be notified of changes that likely don't affect their workflow. The host/build change was much more likely to break your build in a confusing way, here you're just going to get less built and can easily opt back in.


- `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"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels very odd. This seems no different than just removing DEFAULT = true from all of the build-called steps except std; why is that not the approach taken here?

}
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