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 support for targets without unwinding in mir-opt, and improve --bless for it #112418

Merged
merged 13 commits into from
Jun 14, 2023
Merged
Prev Previous commit
Next Next commit
make sure the standard library compiles properly with synthetic targets
It might happen that a synthetic target name does not match one of the
hardcoded ones in std's build script, causing std to fail to build. This
commit changes the std build script avoid including the restricted-std
feature unconditionally when a synthetic target is being built.
  • Loading branch information
pietroalbini committed Jun 12, 2023
commit 6fd0d1ba149a7049f2acb78ed4a93570ce36e3e4
2 changes: 2 additions & 0 deletions library/std/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ fn main() {
|| target.contains("nintendo-3ds")
|| target.contains("vita")
|| target.contains("nto")
// See src/bootstrap/synthetic_targets.rs
|| env::var("RUSTC_BOOTSTRAP_SYNTHETIC_TARGET").is_ok()
{
// These platforms don't have any special requirements.
} else {
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ impl Step for Std {
cargo.arg("-p").arg(krate);
}

// See src/bootstrap/synthetic_targets.rs
if target.is_synthetic() {
cargo.env("RUSTC_BOOTSTRAP_SYNTHETIC_TARGET", "1");
}

let _guard = builder.msg(
Kind::Build,
compiler.stage,
Expand Down