summary refs log tree commit diff
path: root/src/librustc_driver/lib.rs
AgeCommit message (Collapse)AuthorLines
2019-04-03Deny internal lints on non conflicting cratesflip1995-0/+1
- libarena - librustc_allocator - librustc_borrowck - librustc_codegen_ssa - librustc_codegen_utils - librustc_driver - librustc_errors - librustc_incremental - librustc_metadata - librustc_passes - librustc_privacy - librustc_resolve - librustc_save_analysis - librustc_target - librustc_traits - libsyntax - libsyntax_ext - libsyntax_pos
2019-03-27librustc_driver => 2018Taiki Endo-29/+2
2019-03-18Auto merge of #58847 - bjorn3:remove_metadata_only_cg, r=alexcrichtonbors-3/+0
Remove metadata only codegen backend It is unused and probably broken at the moment.
2019-03-16Rename `MetaItem::ident` to `MetaItem::path`Vadim Petrochenkov-1/+1
2019-03-16Remove rustc_driver testsbjorn3-3/+0
2019-03-10Drop expanded AST later if in save_analysis modeIgor Matuszewski-3/+8
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-464/+265
2019-03-06Make `-Z treat-err-as-bug` take a number of errors to be emittedEsteban Küber-2/+2
`-Z treat-err-as-bug=0` will cause `rustc` to panic after the first error is reported. `-Z treat-err-as-bug=2` will cause `rustc` to panic after 3 errors have been reported.
2019-03-03Remove profiler output and replace with a raw event dumpWesley Wiser-6/+1
Related to #58372
2019-03-03Wrap the self-profiler in an `Arc<Mutex<>>`Wesley Wiser-0/+9
This will allow us to send it across threads and measure things like LLVM time.
2019-02-28Introduce rustc_interface and move some methods thereJohn Kåre Alsaker-274/+25
2019-02-12Stabilize slice_sort_by_cached_keyScott McMurray-1/+0
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-4/+4
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-10rustc: doc commentsAlexander Regueiro-4/+4
2019-02-10Rollup merge of #58345 - RalfJung:2nd-filename, r=matthewjasperGuillaume Gomez-1/+9
When there are multiple filenames, print what got interpreted as filenames I have written code that crafts command lines for rustc, and when I get "multiple input filenames provided" it can be quite hard to figure out where in this long list of arguments the mistake is hiding. Probably I passed an argument to a flag that does not expect an argument, but which flag would that be? This changes the error message to print the first two filenames, to make it easier to debug what is going on.
2019-02-10when there are multiple filenames, print what got interpreted as 2nd filenameRalf Jung-1/+9
2019-02-07Rollup merge of #58185 - GuillaumeGomez:images-url, r=SimonSapinGuillaume Gomez-3/+1
Remove images' url to make it work even without internet connection Needed for local std docs mainly. cc @SimonSapin r? @QuietMisdreavus
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-07Auto merge of #58010 - Zoxc:parallel-passes, r=michaelwoeristerbors-0/+1
Move privacy checking later in the pipeline and make some passes run in parallel r? @michaelwoerister
2019-02-06Overhaul `syntax::fold::Folder`.Nicholas Nethercote-4/+5
This commit changes `syntax::fold::Folder` from a functional style (where most methods take a `T` and produce a new `T`) to a more imperative style (where most methods take and modify a `&mut T`), and renames it `syntax::mut_visit::MutVisitor`. The first benefit is speed. The functional style does not require any reallocations, due to the use of `P::map` and `MoveMap::move_{,flat_}map`. However, every field in the AST must be overwritten; even those fields that are unchanged are overwritten with the same value. This causes a lot of unnecessary memory writes. The imperative style reduces instruction counts by 1--3% across a wide range of workloads, particularly incremental workloads. The second benefit is conciseness; the imperative style is usually more concise. E.g. compare the old functional style: ``` fn fold_abc(&mut self, abc: ABC) { ABC { a: fold_a(abc.a), b: fold_b(abc.b), c: abc.c, } } ``` with the imperative style: ``` fn visit_abc(&mut self, ABC { a, b, c: _ }: &mut ABC) { visit_a(a); visit_b(b); } ``` (The reductions get larger in more complex examples.) Overall, the patch removes over 200 lines of code -- even though the new code has more comments -- and a lot of the remaining lines have fewer characters. Some notes: - The old style used methods called `fold_*`. The new style mostly uses methods called `visit_*`, but there are a few methods that map a `T` to something other than a `T`, which are called `flat_map_*` (`T` maps to multiple `T`s) or `filter_map_*` (`T` maps to 0 or 1 `T`s). - `move_map.rs`/`MoveMap`/`move_map`/`move_flat_map` are renamed `map_in_place.rs`/`MapInPlace`/`map_in_place`/`flat_map_in_place` to reflect their slightly changed signatures. - Although this commit renames the `fold` module as `mut_visit`, it keeps it in the `fold.rs` file, so as not to confuse git. The next commit will rename the file.
2019-01-30Move privacy checking later in the pipeline and make some passes run in parallelJohn Kåre Alsaker-0/+1
2019-01-26Replace deprecated ATOMIC_INIT constsMark Rousskov-2/+2
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-1/+0
2019-01-17Querify glob map usage (last use of CrateAnalysis)Igor Matuszewski-2/+0
2019-01-13Always calculate glob map but only for glob usesIgor Matuszewski-2/+0
Previously calculating glob map was *opt-in*, however it did record node id -> ident use for every use directive. This aims to see if we can unconditionally calculate the glob map and not regress performance.
2019-01-09Auto merge of #56614 - Zoxc:query-perf2, r=michaelwoeristerbors-2/+3
Replace LockCell with atomic types Split from https://github.com/rust-lang/rust/pull/56509 r? @michaelwoerister
2019-01-07Revert "Auto merge of #57101 - o01eg:fix-57014, r=alexcrichton"Matthias Krüger-19/+21
This reverts commit 68614265d312fc2cbe8a696f7dabb9416eb6f221, reversing changes made to cae623c5ce12df8f237264d8f2c31fdaa664c382. Should fix tools on windows. Reopens #57014
2019-01-06Auto merge of #57286 - alexcrichton:less-thin-2-2, r=nikomatsakisbors-8/+1
bootstrap: Link LLVM as a dylib with ThinLTO (take 2) When building a distributed compiler on Linux where we use ThinLTO to create the LLVM shared object this commit switches the compiler to dynamically linking that LLVM artifact instead of statically linking to LLVM. The primary goal here is to reduce CI compile times, avoiding two+ ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll reuse the one ThinLTO step done by LLVM's build itself. Lots of discussion about this change can be found [here] and down. A perf run will show whether this is worth it or not! [here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334 --- This PR previously landed in https://github.com/rust-lang/rust/pull/56944, caused https://github.com/rust-lang/rust/issues/57111, and was reverted in https://github.com/rust-lang/rust/pull/57116. I've added one more commit here which should fix the breakage that we saw.
2019-01-05Auto merge of #57101 - o01eg:fix-57014, r=alexcrichtonbors-21/+19
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.
2019-01-02Remove now stray commentAlex Crichton-7/+0
2019-01-02Avoid using open_global_nowAlex Crichton-1/+1
2018-12-29Replace LockCell with atomic typesJohn Kåre Alsaker-2/+3
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-25Revert "Rollup merge of #56944 - alexcrichton:less-thin2, r=michaelwoerister"kennytm-1/+8
This reverts commit f1051b574c26e20608ff26415a3dddd13f140925, reversing changes made to 833e0b3b8a9f1487a61152ca76f7f74a6b32cc0c.
2018-12-24Search codegen backends based on target libdir instead of sysroot.O01eg-21/+19
Fixes cases with custom libdir when it consists of two or more parts.
2018-12-24Rollup merge of #56986 - alexcrichton:move-jemalloc, r=Mark-SimulacrumMazdak Farrokhzad-8/+0
rustc: Move jemalloc from rustc_driver to rustc This commit moves jemalloc to just the rustc binary rather than the rustc_driver shared library, enusring that it's only used for binaries that opt-in to it like rustc rather than other binaries using librustc_driver like rustdoc/rls/etc. This will hopefully address #56980
2018-12-24Rollup merge of #56944 - alexcrichton:less-thin2, r=michaelwoeristerMazdak Farrokhzad-8/+1
bootstrap: Link LLVM as a dylib with ThinLTO When building a distributed compiler on Linux where we use ThinLTO to create the LLVM shared object this commit switches the compiler to dynamically linking that LLVM artifact instead of statically linking to LLVM. The primary goal here is to reduce CI compile times, avoiding two+ ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll reuse the one ThinLTO step done by LLVM's build itself. Lots of discussion about this change can be found [here] and down. A perf run will show whether this is worth it or not! [here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334
2018-12-21Auto merge of #56813 - oli-obk:main_🧶, r=pnkfelixbors-62/+5
Always run rustc in a thread cc @ishitatsuyuki @eddyb r? @pnkfelix [Previously](https://github.com/rust-lang/rust/pull/48575) we moved to only producing threads when absolutely necessary. Even before we opted to only create threads in some cases, which [is unsound](https://github.com/rust-lang/rust/pull/48575#issuecomment-380635967) due to the way we use thread local storage.
2018-12-19rustc: Move jemalloc from rustc_driver to rustcAlex Crichton-8/+0
This commit moves jemalloc to just the rustc binary rather than the rustc_driver shared library, enusring that it's only used for binaries that opt-in to it like rustc rather than other binaries using librustc_driver like rustdoc/rls/etc. This will hopefully address #56980
2018-12-19Auto merge of #56601 - Zoxc:lifetime-killer, r=nikomatsakisbors-1/+0
Make the 'a lifetime on TyCtxt useless cc @rust-lang/compiler r? @nikomatsakis
2018-12-18Remove now stray commentAlex Crichton-7/+0
2018-12-18Avoid using open_global_nowAlex Crichton-1/+1
2018-12-14Remove dead codeOliver Scherer-1/+0
2018-12-14Always run rustc in a threadOliver Scherer-61/+5
2018-12-13Make the 'a lifetime on TyCtxt uselessJohn Kåre Alsaker-1/+0
2018-12-12Remove `Session::sysroot()`.Nicholas Nethercote-1/+1
Instead of maybe storing its own sysroot and maybe deferring to the one in `Session::opts`, just clone the latter when necessary so one is always directly available. This removes the need for the getter.
2018-12-06codegen_utils, driver: fix clippy errorsljedrz-2/+2
2018-12-04updates all Filename variants to take a fingerprintMatthew Russo-1/+1
2018-12-03Bump stack size to 32MBOliver Scherer-3/+5
2018-12-02Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddybbors-1/+0
Refactor rustc_codegen_ssa cc #56108 (not all things are done yet) This removes an unsafe method from cg_ssa. r? @eddyb cc @sunfishcode