Files
rust/compiler/rustc_session
Jonathan Brouwer 24c22c576f Rollup merge of #160451 - Kobzol:lookup-opt, r=petrochenkov
Deduplicate target and host filesearch

I was looking into preprocessing the search directories somehow, so that both host and target don't have to scan them. However, it would be a bit annoying, because they don't share the tlib path. But then I noticed that the code already used `Arc` for `SearchPath`, which was essentially the same optimization, which made sense before https://github.com/rust-lang/rust/pull/158823. But after that PR, it doesn't make sense to put `SearchPath` into `Arc`, because it doesn't really do anything, and the complex logic moved into `FileSearch`. So this PR puts that under `Arc`, to avoid doing duplicated work in the common case, where `host == target`.

r? petrochenkov
2026-08-04 14:41:28 +02:00
..