linker: Remove laziness and caching from native search directory walks

It shouldn't be necessary for performance now.
This commit is contained in:
Vadim Petrochenkov 2024-04-12 17:01:46 +03:00
parent 7bdae134cb
commit ed62b57c86
5 changed files with 22 additions and 121 deletions

View file

@ -171,7 +171,7 @@ fn configure_and_expand(
if cfg!(windows) {
old_path = env::var_os("PATH").unwrap_or(old_path);
let mut new_path = Vec::from_iter(
sess.host_filesearch(PathKind::All).search_path_dirs().map(|p| p.to_owned()),
sess.host_filesearch(PathKind::All).search_paths().map(|p| p.dir.clone()),
);
for path in env::split_paths(&old_path) {
if !new_path.contains(&path) {