Skip to content

Commit

Permalink
remove "build/host" symlink
Browse files Browse the repository at this point in the history
This seems like an overkill. We can still document things consistently without
needing to create a symlink for it. Something like "build/$host-target-triple/stage2"
should be clear enough.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Oct 5, 2024
1 parent f7c8928 commit d9cbd7e
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ use crate::core::builder;
use crate::core::builder::{Builder, Kind};
use crate::core::config::{DryRun, LldMode, LlvmLibunwind, Target, TargetSelection, flags};
use crate::utils::exec::{BehaviorOnFailure, BootstrapCommand, CommandOutput, OutputMode, command};
use crate::utils::helpers::{
self, dir_is_empty, exe, libdir, mtime, output, set_file_times, symlink_dir,
};
use crate::utils::helpers::{self, dir_is_empty, exe, libdir, mtime, output, set_file_times};

mod core;
mod utils;
Expand Down Expand Up @@ -470,23 +468,6 @@ impl Build {
crate::core::metadata::build(&mut build);
}

// Make a symbolic link so we can use a consistent directory in the documentation.
let build_triple = build.out.join(build.build);
t!(fs::create_dir_all(&build_triple));
let host = build.out.join("host");
if host.is_symlink() {
// Left over from a previous build; overwrite it.
// This matters if `build.build` has changed between invocations.
#[cfg(windows)]
t!(fs::remove_dir(&host));
#[cfg(not(windows))]
t!(fs::remove_file(&host));
}
t!(
symlink_dir(&build.config, &build_triple, &host),
format!("symlink_dir({} => {}) failed", host.display(), build_triple.display())
);

build
}

Expand Down

0 comments on commit d9cbd7e

Please sign in to comment.