about summary refs log tree commit diff
path: root/compiler/rustc_session/src/filesearch.rs
AgeCommit message (Collapse)AuthorLines
2024-04-12linker: Remove laziness and caching from native search directory walksVadim Petrochenkov-5/+0
It shouldn't be necessary for performance now.
2024-04-12linker: Avoid some allocations in search directory iterationVadim Petrochenkov-2/+2
2024-03-11Rollup merge of #116793 - WaffleLapkin:target_rules_the_backend, r=cjgillotJubilee-0/+6
Allow targets to override default codegen backend Implements https://github.com/rust-lang/compiler-team/issues/670.
2024-02-18windows bump to 0.52klensy-1/+0
2024-02-15Refactor out a repeating pattern with `get_or_default_sysroot`Maybe Waffle-0/+6
2023-11-30Remove unused `FileMatch`.Nicholas Nethercote-6/+0
2023-05-09bump windows crate 0.46 -> 0.48 in workspaceklensy-2/+2
2023-04-14make sysroot finding compatible with multiarch systemsozkanonur-17/+18
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-03-30Rollup merge of #109522 - bzEq:aix-current-dll-path, r=NilstriebMichael Goulet-0/+44
Implement current_dll_path for AIX AIX doesn't feature `dladdr`, use `loadquery` instead. `loadquery` is documented in https://www.ibm.com/docs/en/aix/7.2?topic=l-loadquery-subroutine.
2023-03-28Check data segment rangeKai Luo-6/+5
2023-03-28Address commentKai Luo-5/+11
2023-03-24Avoid misalignKai Luo-3/+8
2023-03-23Rollup merge of #109231 - Zoxc:fs-non-canon, r=eholkMatthias Krüger-2/+3
Add `try_canonicalize` to `rustc_fs_util` and use it over `fs::canonicalize` This adds `try_canonicalize` which tries to call `fs::canonicalize`, but falls back to `std::path::absolute` if it fails. Existing `canonicalize` calls are replaced with it. `fs::canonicalize` is not guaranteed to work on Windows.
2023-03-23Implement current_dll_path for AIXKai Luo-0/+34
2023-03-20migrate compiler, bootstrap, and compiletest to windows-rsAndy Russell-22/+25
2023-03-16Add `try_canonicalize` to `rustc_fs_util` and use it over `fs::canonicalize`John Kåre Alsaker-2/+3
2023-02-28compiler/rustc_session: fix sysroot detection logic ...liushuyu-1/+11
... on systems where /usr/lib contains a multi-arch structure
2023-02-16Replace some `then`s with some `then_some`sMaybe Waffle-1/+1
2023-02-16`if $c:expr { Some($r:expr) } else { None }` =>> `$c.then(|| $r)`Maybe Waffle-1/+1
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-1/+1
2022-12-19clippy::complexity fixesMatthias Krüger-2/+2
filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-1/+0
2022-11-04improve `filesearch::get_or_default_sysroot` r=ozkanonurOnur Özkan-16/+120
Signed-off-by: Onur Özkan <work@onurozkan.dev>
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+0
by module
2022-03-24Prettify rustc_session fmt with capturing args (nfc)Jubilee Young-1/+1
2022-02-02Inline and remove `FileSearch::search`.Nicholas Nethercote-14/+1
It has only a single callsite, and having all the code in one place will make it possible to optimize the search.
2022-02-02Remove `FileMatch`.Nicholas Nethercote-12/+2
It's returned from `FileSearch::search` but it's only used to print some debug info.
2022-02-02Remove rlib special-casing in `FileSearch::search`.Nicholas Nethercote-10/+1
This code and comment appear to be out of date. `CrateLocator::find_library_crate` is the only caller of this function and it handles rlib vs dylib overlap itself (see `CrateLocator::extract_lib`) after inspecting all the files present, so it doesn't need to see them in any particular order.
2021-12-04Use IntoIterator for array impl everywhere.Mara Bos-2/+2
2021-09-08Move get_tools_search_paths from FileSearch to Sessionbjorn3-12/+0
It only uses fields of FileSearch that are stored in Session too
2021-09-08Doc commentsbjorn3-6/+6
2021-05-10Adjust target search algorithm for rustlib pathSimonas Kazlauskas-53/+15
With this the concerns expressed in #83800 should be addressed.
2021-02-25fix reviewklensy-1/+1
2021-02-23replaced some unwrap_or with unwrap_or_elseklensy-1/+1
2021-02-05Auto merge of #79253 - rcvalle:fix-rustc-sysroot-cas, r=nagisabors-7/+45
Fix rustc sysroot in systems using CAS Change filesearch::get_or_default_sysroot() to check if sysroot is found using env::args().next() if rustc in argv[0] is a symlink; otherwise, or if it is not found, use env::current_exe() to imply sysroot. This makes the rustc binary able to locate Rust libraries in systems using content-addressable storage (CAS).
2021-01-27Fix rustc sysroot in systems using CASRamon de C Valle-7/+45
Change filesearch::get_or_default_sysroot() to check if sysroot is found using env::args().next() if rustc in argv[0] is a symlink; otherwise, or if it is not found, use env::current_exe() to imply sysroot. This makes the rustc binary able to locate Rust libraries in systems using content-addressable storage (CAS).
2020-12-30where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)Matthias Krüger-1/+1
2020-10-28Dogfood {exclusive,half-open} ranges in compiler (nfc)Jubilee Young-2/+2
In particular, this allows us to write more explicit matches that avoid the pitfalls of using a fully general fall-through case, yet remain fairly ergonomic. Less logic is in guard cases, more is in the actual exhaustive case analysis. No functional changes.
2020-09-26Remove unused #[allow(...)] statements from compiler/est31-2/+0
2020-08-30mv compiler to compiler/mark-0/+171