Move the comment on fixing paths to where it belongs
This commit is contained in:
parent
7e07271eaf
commit
4b83156a5c
@ -2688,9 +2688,6 @@ fn add_upstream_native_libraries(
|
||||
// due to the paths including the current working directory. The linker command line
|
||||
// needs to be deterministic since it appears inside the PDB file generated by the MSVC
|
||||
// linker. See https://github.com/rust-lang/rust/issues/112586.
|
||||
//
|
||||
// Note that the `susroot_lib_path` returned by `target_filesearch().get_lib_path()` has
|
||||
// already had `fix_windows_verbatim_for_gcc()` applied if needed.
|
||||
fn rehome_sysroot_rlib_path<'a>(sess: &'a Session, rlib_path: PathBuf) -> PathBuf {
|
||||
let sysroot_lib_path = sess.target_filesearch(PathKind::All).get_lib_path();
|
||||
let canonical_sysroot_lib_path =
|
||||
@ -2700,6 +2697,8 @@ fn rehome_sysroot_rlib_path<'a>(sess: &'a Session, rlib_path: PathBuf) -> PathBu
|
||||
canonical_rlib_dir.pop();
|
||||
|
||||
if canonical_rlib_dir == canonical_sysroot_lib_path {
|
||||
// The `susroot_lib_path` returned by `target_filesearch().get_lib_path()` has
|
||||
// already had `fix_windows_verbatim_for_gcc()` applied if needed.
|
||||
sysroot_lib_path
|
||||
.join(rlib_path.file_name().expect("rlib path has no file name path component"))
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user