about summary refs log tree commit diff
path: root/src/librustc/session/filesearch.rs
AgeCommit message (Collapse)AuthorLines
2019-12-03Move Session to librustc_sessionMark Rousskov-173/+0
2019-03-05Allow linking to a proc macro on the target in metadata and still use a host ↵John Kåre Alsaker-0/+1
proc macro to execute them
2019-02-05move librustc to 2018Mark Mansi-1/+1
2019-01-07Revert "Auto merge of #57101 - o01eg:fix-57014, r=alexcrichton"Matthias Krüger-7/+0
This reverts commit 68614265d312fc2cbe8a696f7dabb9416eb6f221, reversing changes made to cae623c5ce12df8f237264d8f2c31fdaa664c382. Should fix tools on windows. Reopens #57014
2019-01-05Auto merge of #57101 - o01eg:fix-57014, r=alexcrichtonbors-0/+7
Search codegen backends based on target libdir instead of sysroot Fixes #57014 Fixes cases with custom libdir when it consists of two or more parts.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-24Search codegen backends based on target libdir instead of sysroot.O01eg-0/+7
Fixes cases with custom libdir when it consists of two or more parts.
2018-12-12Replace `FileSearch::for_each_lib_search_path` with `search_paths`.Nicholas Nethercote-23/+17
Returning an iterator leads to nicer code all around.
2018-12-12Avoid regenerating the `Vec<PathBuf>` in `FileSearch::search()`.Nicholas Nethercote-23/+11
`FileSearch::search()` traverses one or more directories. For each directory it generates a `Vec<PathBuf>` containing one element per file in that directory. In some benchmarks this occurs enough that the allocations done for the `PathBuf`s are significant, and in practice a small number of directories are being traversed over and over again. For example, when compiling the `tokio-webpush-simple` benchmark, two directories are traversed 58 times each. Each of these directories have more than 100 files. This commit changes things so that all the `Vec<PathBuf>`s that will be needed by a `Session` are precomputed when that `Session` is created; they are stored in `SearchPath`. `FileSearch` gets a reference to the necessary `SearchPath`s. This reduces instruction counts on several benchmarks by 1--5%. The commit also removes the barely-used `visited_dirs` hash in `for_each_lib_searchPath`. It only detects if `tlib_path` is the same as one of the previously seen paths, which is unlikely.
2018-12-12Introduce `SearchPath` and replace `SearchPaths` with `Vec<SearchPath>`.Nicholas Nethercote-16/+17
It's more idiomatic, makes the code shorter, and will help with the next commit.
2018-12-12Avoid a useless `FxHashSet::insert` in `FileSearch::for_each_lib_search_path`.Nicholas Nethercote-2/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-04cleanup: remove static lifetimes from constsljedrz-4/+4
2018-10-15rustc/session: move consts up to improve readabilityljedrz-9/+9
2018-10-15rustc/session: improve common patternsljedrz-1/+1
2018-10-15rustc/session: improve allocationsljedrz-1/+1
2018-10-15rustc/session: whitespace & formatting improvementsljedrz-1/+1
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-2/+2
2018-08-09Move rustc::util::fs into separate (new) crateMark Rousskov-2/+2
2017-10-08address more FIXME whose associated issues were marked as closedNiv Kaminer-2/+0
update FIXME(#6298) to point to open issue 15020 update FIXME(#6268) to point to RFC 811 update FIXME(#10520) to point to RFC 1751 remove FIXME for emscripten issue 4563 and include target in `test_estimate_scaling_factor` remove FIXME(#18207) since node_id isn't used for `ref` pattern analysis remove FIXME(#6308) since DST was implemented in #12938 remove FIXME(#2658) since it was decided to not reorganize module remove FIXME(#20590) since it was decided to stay conservative with projection types remove FIXME(#20297) since it was decided that solving the issue is unnecessary remove FIXME(#27086) since closures do correspond to structs now remove FIXME(#13846) and enable `function_sections` for windows remove mention of #22079 in FIXME(#22079) since this is a general FIXME remove FIXME(#5074) since the restriction on borrow were lifted
2017-07-05use field init shorthand in src/librustcZack M. Davis-4/+4
The field init shorthand syntax was stabilized in 1.17.0 (aebd94f); we are now free to use it in the compiler.
2017-05-17Improve the error management when /proc is not mountedSylvestre Ledru-3/+8
This PR does two things: * Triggers an error on GNU/Linux & Android when /proc/self/exe doesn't exist * Handle the error properly
2016-10-10Simplify `str` and `Path` comparison.Corey Farwell-1/+1
2016-10-10Return early to avoid excessive indentation.`Corey Farwell-24/+23
2016-10-10Use `Cow` instead of `String` to avoid unnecessary allocations.Corey Farwell-3/+4
2016-10-10Convert `String` generating functions into `&str` constants.Corey Farwell-18/+10
2016-04-12Remove unused trait importsSeo Sanghyeon-1/+0
2016-03-31librustc: replace panic!() with bug!()Benjamin Herr-2/+2
2015-11-26split the metadata code into rustc_metadataAriel Ben-Yehuda-0/+207
tests & rustdoc still broken