Skip to content

Rollup of 13 pull requests #81111

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

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b498870
use hir::Place instead of Symbol in closure_kind_origin
roxelo Dec 3, 2020
b7071b2
resolve: Simplify collection of traits in scope
petrochenkov Jan 6, 2021
7aca2fa
Remove is_dllimport_foreign_item def from cg_ssa
bjorn3 Jan 13, 2021
6766070
Allow downloading LLVM on Windows
jyn514 Jan 12, 2021
5c4adbe
Add all tier 1 platforms to supported platforms for "if-available"
jyn514 Jan 13, 2021
8b702e0
Support non-stage0 check
Mark-Simulacrum Jan 16, 2021
c17ed34
Print which stage is being checked (now that it may not be stage0)
jyn514 Jan 16, 2021
53989e4
Allow configuring the default stage for `x.py check`
jyn514 Jan 16, 2021
50ee0b2
BTreeMap: clean up a few more comments
ssomers Nov 18, 2020
28501c0
rustc_parse_format: Fix character indices in find_skips
osa1 Jan 16, 2021
15f0921
correctly deal with late-bound lifetimes in anon consts
lcnr Nov 22, 2020
76003f3
Use Option::map instead of open-coding it
LingMan Dec 30, 2020
5a706cf
Use Option::unwrap_or instead of open-coding it
LingMan Jan 16, 2021
7f9a2cf
resolve: Reject ambiguity built-in attr vs different built-in attr
petrochenkov Dec 13, 2020
4e27ed3
Add benchmark and fast path for BufReader::read_exact
saethlin Dec 19, 2020
3e16e92
Add NonZeroUn::is_power_of_two
scottmcm Jan 17, 2021
5451592
Rollup merge of #79298 - lcnr:new-elysium, r=matthewjasper
m-ou-se Jan 17, 2021
ea81a28
Rollup merge of #80031 - petrochenkov:builtina, r=estebank
m-ou-se Jan 17, 2021
1448a76
Rollup merge of #80201 - saethlin:bufreader-read-exact, r=KodrAus
m-ou-se Jan 17, 2021
343b860
Rollup merge of #80635 - sexxi-goose:use-place-instead-of-symbol, r=n…
m-ou-se Jan 17, 2021
b0dca9b
Rollup merge of #80765 - petrochenkov:traitsinscope, r=matthewjasper
m-ou-se Jan 17, 2021
98cc8ae
Rollup merge of #80932 - jyn514:download-windows-llvm, r=Mark-Simulacrum
m-ou-se Jan 17, 2021
0686e85
Rollup merge of #80983 - bjorn3:no_dup_is_dllimport_foreign_item, r=n…
m-ou-se Jan 17, 2021
ed10e8f
Rollup merge of #81064 - Mark-Simulacrum:support-stage1-check, r=jyn514
m-ou-se Jan 17, 2021
c36acae
Rollup merge of #81071 - osa1:fix_81006, r=estebank
m-ou-se Jan 17, 2021
fde7956
Rollup merge of #81082 - ssomers:btree_cleanup_comments, r=Mark-Simul…
m-ou-se Jan 17, 2021
076c019
Rollup merge of #81084 - LingMan:map, r=oli-obk
m-ou-se Jan 17, 2021
24b606d
Rollup merge of #81095 - LingMan:unwrap, r=oli-obk
m-ou-se Jan 17, 2021
94ec9f9
Rollup merge of #81107 - scottmcm:nonzero-is_power_of_two, r=kennytm
m-ou-se Jan 17, 2021
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
51 changes: 36 additions & 15 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl Step for Std {

fn run(self, builder: &Builder<'_>) {
let target = self.target;
let compiler = builder.compiler(0, builder.config.build);
let compiler = builder.compiler(builder.top_stage, builder.config.build);

let mut cargo = builder.cargo(
compiler,
Expand All @@ -84,7 +84,10 @@ impl Step for Std {
);
std_cargo(builder, target, compiler.stage, &mut cargo);

builder.info(&format!("Checking std artifacts ({} -> {})", &compiler.host, target));
builder.info(&format!(
"Checking stage{} std artifacts ({} -> {})",
builder.top_stage, &compiler.host, target
));
run_cargo(
builder,
cargo,
Expand All @@ -94,9 +97,13 @@ impl Step for Std {
true,
);

let libdir = builder.sysroot_libdir(compiler, target);
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
add_to_sysroot(&builder, &libdir, &hostdir, &libstd_stamp(builder, compiler, target));
// We skip populating the sysroot in non-zero stage because that'll lead
// to rlib/rmeta conflicts if std gets built during this session.
if compiler.stage == 0 {
let libdir = builder.sysroot_libdir(compiler, target);
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
add_to_sysroot(&builder, &libdir, &hostdir, &libstd_stamp(builder, compiler, target));
}

// Then run cargo again, once we've put the rmeta files for the library
// crates into the sysroot. This is needed because e.g., core's tests
Expand Down Expand Up @@ -124,8 +131,8 @@ impl Step for Std {
}

builder.info(&format!(
"Checking std test/bench/example targets ({} -> {})",
&compiler.host, target
"Checking stage{} std test/bench/example targets ({} -> {})",
builder.top_stage, &compiler.host, target
));
run_cargo(
builder,
Expand Down Expand Up @@ -163,10 +170,20 @@ impl Step for Rustc {
/// the `compiler` targeting the `target` architecture. The artifacts
/// created will also be linked into the sysroot directory.
fn run(self, builder: &Builder<'_>) {
let compiler = builder.compiler(0, builder.config.build);
let compiler = builder.compiler(builder.top_stage, builder.config.build);
let target = self.target;

builder.ensure(Std { target });
if compiler.stage != 0 {
// If we're not in stage 0, then we won't have a std from the beta
// compiler around. That means we need to make sure there's one in
// the sysroot for the compiler to find. Otherwise, we're going to
// fail when building crates that need to generate code (e.g., build
// scripts and their dependencies).
builder.ensure(crate::compile::Std { target: compiler.host, compiler });
builder.ensure(crate::compile::Std { target, compiler });
} else {
builder.ensure(Std { target });
}

let mut cargo = builder.cargo(
compiler,
Expand All @@ -187,7 +204,10 @@ impl Step for Rustc {
cargo.arg("-p").arg(krate.name);
}

builder.info(&format!("Checking compiler artifacts ({} -> {})", &compiler.host, target));
builder.info(&format!(
"Checking stage{} compiler artifacts ({} -> {})",
builder.top_stage, &compiler.host, target
));
run_cargo(
builder,
cargo,
Expand Down Expand Up @@ -225,7 +245,7 @@ impl Step for CodegenBackend {
}

fn run(self, builder: &Builder<'_>) {
let compiler = builder.compiler(0, builder.config.build);
let compiler = builder.compiler(builder.top_stage, builder.config.build);
let target = self.target;
let backend = self.backend;

Expand All @@ -244,8 +264,8 @@ impl Step for CodegenBackend {
rustc_cargo_env(builder, &mut cargo, target);

builder.info(&format!(
"Checking {} artifacts ({} -> {})",
backend, &compiler.host.triple, target.triple
"Checking stage{} {} artifacts ({} -> {})",
builder.top_stage, backend, &compiler.host.triple, target.triple
));

run_cargo(
Expand Down Expand Up @@ -280,7 +300,7 @@ macro_rules! tool_check_step {
}

fn run(self, builder: &Builder<'_>) {
let compiler = builder.compiler(0, builder.config.build);
let compiler = builder.compiler(builder.top_stage, builder.config.build);
let target = self.target;

builder.ensure(Rustc { target });
Expand All @@ -301,7 +321,8 @@ macro_rules! tool_check_step {
}

builder.info(&format!(
"Checking {} artifacts ({} -> {})",
"Checking stage{} {} artifacts ({} -> {})",
builder.top_stage,
stringify!($name).to_lowercase(),
&compiler.host.triple,
target.triple
Expand Down
3 changes: 2 additions & 1 deletion src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ struct Build {
configure_args: Option<Vec<String>>,
local_rebuild: Option<bool>,
print_step_timings: Option<bool>,
check_stage: Option<u32>,
doc_stage: Option<u32>,
build_stage: Option<u32>,
test_stage: Option<u32>,
Expand Down Expand Up @@ -676,6 +677,7 @@ impl Config {

// See https://github.com/rust-lang/compiler-team/issues/326
config.stage = match config.cmd {
Subcommand::Check { .. } => flags.stage.or(build.check_stage).unwrap_or(0),
Subcommand::Doc { .. } => flags.stage.or(build.doc_stage).unwrap_or(0),
Subcommand::Build { .. } => flags.stage.or(build.build_stage).unwrap_or(1),
Subcommand::Test { .. } => flags.stage.or(build.test_stage).unwrap_or(1),
Expand All @@ -685,7 +687,6 @@ impl Config {
// These are all bootstrap tools, which don't depend on the compiler.
// The stage we pass shouldn't matter, but use 0 just in case.
Subcommand::Clean { .. }
| Subcommand::Check { .. }
| Subcommand::Clippy { .. }
| Subcommand::Fix { .. }
| Subcommand::Run { .. }
Expand Down
6 changes: 1 addition & 5 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,10 @@ Arguments:
};

if let Subcommand::Check { .. } = &cmd {
if matches.opt_str("stage").is_some() {
println!("--stage not supported for x.py check, always treated as stage 0");
process::exit(1);
}
if matches.opt_str("keep-stage").is_some()
|| matches.opt_str("keep-stage-std").is_some()
{
println!("--keep-stage not supported for x.py check, only one stage available");
println!("--keep-stage not yet supported for x.py check");
process::exit(1);
}
}
Expand Down