Skip to content

Instantly share code, notes, and snippets.

@alexcrichton
Created March 26, 2019 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexcrichton/d5c864b4024bce3d68dee9ac8e01ab2b to your computer and use it in GitHub Desktop.
Save alexcrichton/d5c864b4024bce3d68dee9ac8e01ab2b to your computer and use it in GitHub Desktop.
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index f93f3e72f8..10ad613329 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -831,14 +831,19 @@ impl<'a> Builder<'a> {
// FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
// Force cargo to output binaries with disambiguating hashes in the name
- let metadata = if compiler.stage == 0 {
+ let mut metadata = if compiler.stage == 0 {
// Treat stage0 like special channel, whether it's a normal prior-
// release rustc or a local rebuild with the same version, so we
// never mix these libraries by accident.
- "bootstrap"
+ "bootstrap".to_string()
} else {
- &self.config.channel
+ self.config.channel.to_string()
};
+ match mode {
+ Mode::Std => metadata.push_str("std"),
+ Mode::Test => metadata.push_str("test"),
+ _ => {}
+ }
cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);
let stage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment