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.
This commit is contained in:
parent
47f88e17ab
commit
1ae3cff1eb
2 changed files with 2 additions and 2 deletions
|
@ -972,7 +972,7 @@ impl Step for Assemble {
|
||||||
|
|
||||||
// Link the compiler binary itself into place
|
// Link the compiler binary itself into place
|
||||||
let out_dir = builder.cargo_out(build_compiler, Mode::Librustc, host);
|
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");
|
let bindir = sysroot.join("bin");
|
||||||
t!(fs::create_dir_all(&bindir));
|
t!(fs::create_dir_all(&bindir));
|
||||||
let compiler = builder.rustc(target_compiler);
|
let compiler = builder.rustc(target_compiler);
|
||||||
|
|
|
@ -4,7 +4,7 @@ name = "rustc-main"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rustc"
|
name = "rustc_binary"
|
||||||
path = "rustc.rs"
|
path = "rustc.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
Loading…
Add table
Reference in a new issue