diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-05-11 21:30:02 -0600 |
|---|---|---|
| committer | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-05-17 08:47:25 -0600 |
| commit | 1ae3cff1eb6d849b5179b707f4ef0564e5fe9022 (patch) | |
| tree | a4f5feda0646bdbf653126fc42df5ebe4d3bcb3b | |
| parent | 47f88e17ab149d18b7aa295645cc2524de06e2bf (diff) | |
| download | rust-1ae3cff1eb6d849b5179b707f4ef0564e5fe9022.tar.gz rust-1ae3cff1eb6d849b5179b707f4ef0564e5fe9022.zip | |
Fix rustc binary metadata overwriting librustc metadata
In #49289, rustc was changed to emit metadata for binaries, which made it so that the librustc.rmeta file created when compiling librustc was overwritten by the rustc-main compilation. This commit renames the rustc-main binary to avoid this problem. https://github.com/rust-lang/cargo/issues/5524 has also been filed to see if Cargo can learn to warn on this situation instead of leaving it for the user to debug.
| -rw-r--r-- | src/bootstrap/compile.rs | 2 | ||||
| -rw-r--r-- | src/rustc/Cargo.toml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 1248c2b50be..163493a443d 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -972,7 +972,7 @@ impl Step for Assemble { // Link the compiler binary itself into place let out_dir = builder.cargo_out(build_compiler, Mode::Librustc, host); - let rustc = out_dir.join(exe("rustc", &*host)); + let rustc = out_dir.join(exe("rustc_binary", &*host)); let bindir = sysroot.join("bin"); t!(fs::create_dir_all(&bindir)); let compiler = builder.rustc(target_compiler); diff --git a/src/rustc/Cargo.toml b/src/rustc/Cargo.toml index 9986e0b512a..9ccd37a6a45 100644 --- a/src/rustc/Cargo.toml +++ b/src/rustc/Cargo.toml @@ -4,7 +4,7 @@ name = "rustc-main" version = "0.0.0" [[bin]] -name = "rustc" +name = "rustc_binary" path = "rustc.rs" [dependencies] |
