From b7c5599d22018ab6be88442c4668bc1697f85b8e Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Mon, 10 May 2021 19:15:19 +0300 Subject: Adjust target search algorithm for rustlib path With this the concerns expressed in #83800 should be addressed. --- compiler/rustc_interface/src/util.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/rustc_interface/src') 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()); -- cgit 1.4.1-3-g733a5