1
Fork 0

Adjust target search algorithm for rustlib path

With this the concerns expressed in #83800 should be addressed.
This commit is contained in:
Simonas Kazlauskas 2021-05-10 19:15:19 +03:00
parent 2fb1dee14b
commit b7c5599d22
5 changed files with 83 additions and 66 deletions

View file

@ -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());