diff options
| author | Lukas Markeffsky <@> | 2023-06-23 16:28:08 +0000 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2023-07-14 09:41:35 +0000 |
| commit | b1a5423ff8e2284a02aa75bf4467c9f49bb2e95b (patch) | |
| tree | d6c87aef4ea90385b1f1bad73fb0317a1bbc8fb9 /src/bootstrap/compile.rs | |
| parent | fe03b46ee4688a99d7155b4f9dcd875b6903952d (diff) | |
bootstrap: update defaults for `compiler` and `library` aliases
Diffstat (limited to 'src/bootstrap/compile.rs')
| -rw-r--r-- | src/bootstrap/compile.rs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index caa7417011e..07a07983bd7 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -55,17 +55,6 @@ impl Std { } } -/// Given an `alias` selected by the `Step` and the paths passed on the command line, -/// return a list of the crates that should be built. -/// -/// Normally, people will pass *just* `library` if they pass it. -/// But it's possible (although strange) to pass something like `library std core`. -/// Build all crates anyway, as if they hadn't passed the other args. -pub(crate) fn make_run_crates(run: &RunConfig<'_>, alias: &str) -> Interned<Vec<String>> { - let has_alias = run.paths.iter().any(|set| set.assert_single_path().path.ends_with(alias)); - if has_alias { Default::default() } else { run.cargo_crates_in_set() } -} - impl Step for Std { type Output = (); const DEFAULT: bool = true; @@ -80,10 +69,15 @@ impl Step for Std { } fn make_run(run: RunConfig<'_>) { + // If the paths include "library", build the entire standard library. + let has_alias = + run.paths.iter().any(|set| set.assert_single_path().path.ends_with("library")); + let crates = if has_alias { Default::default() } else { run.cargo_crates_in_set() }; + run.builder.ensure(Std { compiler: run.builder.compiler(run.builder.top_stage, run.build_triple()), target: run.target, - crates: make_run_crates(&run, "library"), + crates, force_recompile: false, }); } |
