1
Fork 0

linker: Pass fewer search directories to the linker

This commit is contained in:
Vadim Petrochenkov 2024-07-29 22:17:25 +03:00
parent a6043039ad
commit 35977b47cc
2 changed files with 61 additions and 38 deletions

View file

@ -19,6 +19,11 @@ pub struct FileSearch<'a> {
}
impl<'a> FileSearch<'a> {
pub fn cli_search_paths(&self) -> impl Iterator<Item = &'a SearchPath> {
let kind = self.kind;
self.cli_search_paths.iter().filter(move |sp| sp.kind.matches(kind))
}
pub fn search_paths(&self) -> impl Iterator<Item = &'a SearchPath> {
let kind = self.kind;
self.cli_search_paths