Auto merge of #121079 - onur-ozkan:install-conflicts, r=albertlarsan68 · rust-lang/rust@43d3470 (original) (raw)
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -398,10 +398,11 @@ impl Step for Rustc { | ||
398 | 398 | let host = compiler.host; |
399 | 399 | let src = builder.sysroot(compiler); |
400 | 400 | |
401 | -// Copy rustc/rustdoc binaries | |
401 | +// Copy rustc binary | |
402 | 402 | t!(fs::create_dir_all(image.join("bin"))); |
403 | 403 | builder.cp_r(&src.join("bin"), &image.join("bin")); |
404 | 404 | |
405 | +// If enabled, copy rustdoc binary | |
405 | 406 | if builder |
406 | 407 | .config |
407 | 408 | .tools |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -95,7 +95,7 @@ fn install_sh( | ||
95 | 95 | } |
96 | 96 | |
97 | 97 | let datadir = prefix.join(default_path(&builder.config.datadir, "share")); |
98 | -let docdir = prefix.join(default_path(&builder.config.docdir, "share/doc/rust")); | |
98 | +let docdir = prefix.join(default_path(&builder.config.docdir, &format!("share/doc/{package}"))); | |
99 | 99 | let mandir = prefix.join(default_path(&builder.config.mandir, "share/man")); |
100 | 100 | let libdir = prefix.join(default_path(&builder.config.libdir, "lib")); |
101 | 101 | let bindir = prefix.join(&builder.config.bindir); // Default in config.rs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -858,6 +858,11 @@ impl<'a> Builder<'a> { | ||
858 | 858 | Kind::Install => describe!( |
859 | 859 | install::Docs, |
860 | 860 | install::Std, |
861 | +// During the Rust compiler (rustc) installation process, we copy the entire sysroot binary | |
862 | +// path (build/host/stage2/bin). Since the building tools also make their copy in the sysroot | |
863 | +// binary path, we must install rustc before the tools. Otherwise, the rust-installer will | |
864 | +// install the same binaries twice for each tool, leaving backup files (*.old) as a result. | |
865 | + install::Rustc, | |
861 | 866 | install::Cargo, |
862 | 867 | install::RustAnalyzer, |
863 | 868 | install::Rustfmt, |
@@ -866,7 +871,6 @@ impl<'a> Builder<'a> { | ||
866 | 871 | install::Miri, |
867 | 872 | install::LlvmTools, |
868 | 873 | install::Src, |
869 | - install::Rustc, | |
870 | 874 | ), |
871 | 875 | Kind::Run => describe!( |
872 | 876 | run::ExpandYamlAnchors, |