diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 84415baa3a1..e6102de1874 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -24,23 +24,7 @@ use std::str::FromStr; use std::time::Instant; fn main() { - let mut args = env::args_os().skip(1).collect::>(); - - // Append metadata suffix for internal crates. See the corresponding entry - // in bootstrap/lib.rs for details. - if let Ok(s) = env::var("RUSTC_METADATA_SUFFIX") { - for i in 1..args.len() { - // Dirty code for borrowing issues - let mut new = None; - if let Some(current_as_str) = args[i].to_str() { - if (&*args[i - 1] == "-C" && current_as_str.starts_with("metadata")) || - current_as_str.starts_with("-Cmetadata") { - new = Some(format!("{}-{}", current_as_str, s)); - } - } - if let Some(new) = new { args[i] = new.into(); } - } - } + let args = env::args_os().skip(1).collect::>(); // Detect whether or not we're a build script depending on whether --target // is passed (a bit janky...) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 399130d6755..6323fa94ccf 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -939,24 +939,6 @@ impl<'a> Builder<'a> { if !mode.is_tool() { cargo.env("RUSTC_FORCE_UNSTABLE", "1"); - - // Currently the compiler depends on crates from crates.io, and - // then other crates can depend on the compiler (e.g., proc-macro - // crates). Let's say, for example that rustc itself depends on the - // bitflags crate. If an external crate then depends on the - // bitflags crate as well, we need to make sure they don't - // conflict, even if they pick the same version of bitflags. We'll - // want to make sure that e.g., a plugin and rustc each get their - // own copy of bitflags. - - // Cargo ensures that this works in general through the -C metadata - // flag. This flag will frob the symbols in the binary to make sure - // they're different, even though the source code is the exact - // same. To solve this problem for the compiler we extend Cargo's - // already-passed -C metadata flag with our own. Our rustc.rs - // wrapper around the actual rustc will detect -C metadata being - // passed and frob it with this extra string we're passing in. - cargo.env("RUSTC_METADATA_SUFFIX", "rustc"); } if let Some(x) = self.crt_static(target) {