about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2023-06-14 10:58:08 -0400
committerdanakj <danakj@chromium.org>2023-06-14 10:58:08 -0400
commit4b83156a5c503174e7b4ce130edbe348fcd82817 (patch)
treec6028e6f3145a0bb7a918016e8df5942dac0d70e /compiler/rustc_codegen_ssa/src/back
parent7e07271eaf6f8ae1f3b2c3ffeb46bf1c13f36bc1 (diff)
downloadrust-4b83156a5c503174e7b4ce130edbe348fcd82817.tar.gz
rust-4b83156a5c503174e7b4ce130edbe348fcd82817.zip
Move the comment on fixing paths to where it belongs
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
-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 {