diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-07-29 22:17:25 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-08-03 14:20:18 +0300 |
| commit | 35977b47cc80e54af8e8559231945bada6fe1c01 (patch) | |
| tree | 5bcb84f995dce04ce445988f56df54bb123079b8 /compiler/rustc_session/src/filesearch.rs | |
| parent | a6043039ad3aef48e08d72a3e32545accdee427a (diff) | |
| download | rust-35977b47cc80e54af8e8559231945bada6fe1c01.tar.gz rust-35977b47cc80e54af8e8559231945bada6fe1c01.zip | |
linker: Pass fewer search directories to the linker
Diffstat (limited to 'compiler/rustc_session/src/filesearch.rs')
| -rw-r--r-- | compiler/rustc_session/src/filesearch.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/filesearch.rs b/compiler/rustc_session/src/filesearch.rs index 0c3ec36fed5..63ca5fefd9f 100644 --- a/compiler/rustc_session/src/filesearch.rs +++ b/compiler/rustc_session/src/filesearch.rs @@ -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 |
