about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 9c53e5c0531..6369116ece3 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -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 {