We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df1b5d3 commit 1edff46Copy full SHA for 1edff46
compiler/rustc_session/src/session.rs
@@ -454,6 +454,8 @@ impl Session {
454
let bin_path = filesearch::make_target_bin_path(&self.sysroot, config::host_triple());
455
let fallback_sysroot_paths = filesearch::sysroot_candidates()
456
.into_iter()
457
+ // Ignore sysroot candidate if it was the same as the sysroot path we just used.
458
+ .filter(|sysroot| *sysroot != self.sysroot)
459
.map(|sysroot| filesearch::make_target_bin_path(&sysroot, config::host_triple()));
460
let search_paths = std::iter::once(bin_path).chain(fallback_sysroot_paths);
461
0 commit comments