Skip to content

Commit 4b83156

Browse files
committed
Move the comment on fixing paths to where it belongs
1 parent 7e07271 commit 4b83156

File tree

1 file changed

+2
-3
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+2
-3
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -2688,9 +2688,6 @@ fn add_upstream_native_libraries(
26882688
// due to the paths including the current working directory. The linker command line
26892689
// needs to be deterministic since it appears inside the PDB file generated by the MSVC
26902690
// linker. See https://github.com/rust-lang/rust/issues/112586.
2691-
//
2692-
// Note that the `susroot_lib_path` returned by `target_filesearch().get_lib_path()` has
2693-
// already had `fix_windows_verbatim_for_gcc()` applied if needed.
26942691
fn rehome_sysroot_rlib_path<'a>(sess: &'a Session, rlib_path: PathBuf) -> PathBuf {
26952692
let sysroot_lib_path = sess.target_filesearch(PathKind::All).get_lib_path();
26962693
let canonical_sysroot_lib_path =
@@ -2700,6 +2697,8 @@ fn rehome_sysroot_rlib_path<'a>(sess: &'a Session, rlib_path: PathBuf) -> PathBu
27002697
canonical_rlib_dir.pop();
27012698

27022699
if canonical_rlib_dir == canonical_sysroot_lib_path {
2700+
// The `susroot_lib_path` returned by `target_filesearch().get_lib_path()` has
2701+
// already had `fix_windows_verbatim_for_gcc()` applied if needed.
27032702
sysroot_lib_path
27042703
.join(rlib_path.file_name().expect("rlib path has no file name path component"))
27052704
} else {

0 commit comments

Comments
 (0)