mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
Avoid redundant additions to PATH when linking
This commit is contained in:
parent
df1b5d3cc2
commit
1edff466e1
@ -454,6 +454,8 @@ impl Session {
|
||||
let bin_path = filesearch::make_target_bin_path(&self.sysroot, config::host_triple());
|
||||
let fallback_sysroot_paths = filesearch::sysroot_candidates()
|
||||
.into_iter()
|
||||
// Ignore sysroot candidate if it was the same as the sysroot path we just used.
|
||||
.filter(|sysroot| *sysroot != self.sysroot)
|
||||
.map(|sysroot| filesearch::make_target_bin_path(&sysroot, config::host_triple()));
|
||||
let search_paths = std::iter::once(bin_path).chain(fallback_sysroot_paths);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user