Auto merge of #121079 - onur-ozkan:install-conflicts, r=albertlarsan68
distribute tool documentations and avoid file conflicts on `x install` I suggest reading commits one-by-one with the descriptions for more context about the changes. Fixes #115213
This commit is contained in:
commit
43d3470f11
@ -398,10 +398,11 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
|||||||
let host = compiler.host;
|
let host = compiler.host;
|
||||||
let src = builder.sysroot(compiler);
|
let src = builder.sysroot(compiler);
|
||||||
|
|
||||||
// Copy rustc/rustdoc binaries
|
// Copy rustc binary
|
||||||
t!(fs::create_dir_all(image.join("bin")));
|
t!(fs::create_dir_all(image.join("bin")));
|
||||||
builder.cp_r(&src.join("bin"), &image.join("bin"));
|
builder.cp_r(&src.join("bin"), &image.join("bin"));
|
||||||
|
|
||||||
|
// If enabled, copy rustdoc binary
|
||||||
if builder
|
if builder
|
||||||
.config
|
.config
|
||||||
.tools
|
.tools
|
||||||
|
@ -95,7 +95,7 @@ fn install_sh(
|
|||||||
}
|
}
|
||||||
|
|
||||||
let datadir = prefix.join(default_path(&builder.config.datadir, "share"));
|
let datadir = prefix.join(default_path(&builder.config.datadir, "share"));
|
||||||
let docdir = prefix.join(default_path(&builder.config.docdir, "share/doc/rust"));
|
let docdir = prefix.join(default_path(&builder.config.docdir, &format!("share/doc/{package}")));
|
||||||
let mandir = prefix.join(default_path(&builder.config.mandir, "share/man"));
|
let mandir = prefix.join(default_path(&builder.config.mandir, "share/man"));
|
||||||
let libdir = prefix.join(default_path(&builder.config.libdir, "lib"));
|
let libdir = prefix.join(default_path(&builder.config.libdir, "lib"));
|
||||||
let bindir = prefix.join(&builder.config.bindir); // Default in config.rs
|
let bindir = prefix.join(&builder.config.bindir); // Default in config.rs
|
||||||
|
@ -858,6 +858,11 @@ macro_rules! describe {
|
|||||||
Kind::Install => describe!(
|
Kind::Install => describe!(
|
||||||
install::Docs,
|
install::Docs,
|
||||||
install::Std,
|
install::Std,
|
||||||
|
// During the Rust compiler (rustc) installation process, we copy the entire sysroot binary
|
||||||
|
// path (build/host/stage2/bin). Since the building tools also make their copy in the sysroot
|
||||||
|
// binary path, we must install rustc before the tools. Otherwise, the rust-installer will
|
||||||
|
// install the same binaries twice for each tool, leaving backup files (*.old) as a result.
|
||||||
|
install::Rustc,
|
||||||
install::Cargo,
|
install::Cargo,
|
||||||
install::RustAnalyzer,
|
install::RustAnalyzer,
|
||||||
install::Rustfmt,
|
install::Rustfmt,
|
||||||
@ -866,7 +871,6 @@ macro_rules! describe {
|
|||||||
install::Miri,
|
install::Miri,
|
||||||
install::LlvmTools,
|
install::LlvmTools,
|
||||||
install::Src,
|
install::Src,
|
||||||
install::Rustc,
|
|
||||||
),
|
),
|
||||||
Kind::Run => describe!(
|
Kind::Run => describe!(
|
||||||
run::ExpandYamlAnchors,
|
run::ExpandYamlAnchors,
|
||||||
|
Loading…
Reference in New Issue
Block a user