From 4b83156a5c503174e7b4ce130edbe348fcd82817 Mon Sep 17 00:00:00 2001 From: danakj Date: Wed, 14 Jun 2023 10:58:08 -0400 Subject: Move the comment on fixing paths to where it belongs --- compiler/rustc_codegen_ssa/src/back/link.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_codegen_ssa') 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 { -- cgit 1.4.1-3-g733a5