summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorSimonas Kazlauskas <git@kazlauskas.me>2021-05-10 19:15:19 +0300
committerSimonas Kazlauskas <git@kazlauskas.me>2021-05-10 19:15:19 +0300
commitb7c5599d22018ab6be88442c4668bc1697f85b8e (patch)
treed1073b3273c158b7c329bb8382aef2923969ebd0 /compiler/rustc_interface/src
parent2fb1dee14b3eff979f91e99ad034cfe262fc78c3 (diff)
downloadrust-b7c5599d22018ab6be88442c4668bc1697f85b8e.tar.gz
rust-b7c5599d22018ab6be88442c4668bc1697f85b8e.zip
Adjust target search algorithm for rustlib path
With this the concerns expressed in #83800 should be addressed.
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/util.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index 59488fc80a5..fd29053433e 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -423,8 +423,7 @@ pub fn get_codegen_sysroot(
         .iter()
         .chain(sysroot_candidates.iter())
         .map(|sysroot| {
-            let libdir = filesearch::relative_target_lib_path(&sysroot, &target);
-            sysroot.join(libdir).with_file_name("codegen-backends")
+            filesearch::make_target_lib_path(&sysroot, &target).with_file_name("codegen-backends")
         })
         .find(|f| {
             info!("codegen backend candidate: {}", f.display());