Skip to content

Commit 07bb050

Browse files
committed
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.
1 parent 31e002f commit 07bb050

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

std/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ fn main() {
3636
|| target.contains("nintendo-3ds")
3737
|| target.contains("vita")
3838
|| target.contains("nto")
39+
// See src/bootstrap/synthetic_targets.rs
40+
|| env::var("RUSTC_BOOTSTRAP_SYNTHETIC_TARGET").is_ok()
3941
{
4042
// These platforms don't have any special requirements.
4143
} else {

0 commit comments

Comments
 (0)