From 892ef6fa48bd20c037351e0cf8ea12c4c429a868 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Fri, 16 Aug 2019 20:12:10 +0300 Subject: rustbuild: work around the stdarch cfg(bootstrap) bug. --- src/bootstrap/bin/rustc.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 9c01de8aa82..d7887f74cc1 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -102,8 +102,13 @@ fn main() { // FIXME: the fact that core here is excluded is due to core_arch from our stdarch submodule // being broken on the beta compiler with bootstrap passed, so this is a temporary workaround // (we've just snapped, so there are no cfg(bootstrap) related annotations in core). - if stage == "0" && crate_name != Some("core") { - cmd.arg("--cfg").arg("bootstrap"); + if stage == "0" { + if crate_name != Some("core") { + cmd.arg("--cfg").arg("bootstrap"); + } else { + // NOTE(eddyb) see FIXME above, except now we need annotations again in core. + cmd.arg("--cfg").arg("boostrap_stdarch_ignore_this"); + } } // Print backtrace in case of ICE -- cgit 1.4.1-3-g733a5