about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
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-07Auto merge of #57303 - matthiaskrgr:clippy_submodule_upd, r=oli-obkbors-19/+21
submodules: update clippy and rls Fixes clippy toolstate Changes: ```` Update to latest compiletest-rs release add testcase for #3462 deps: bump rustc_tools_util version from 0.1.0 to 0.1.1 just in case... rustc_tool_utils: fix failure to create proper non-repo version string when used in crates on crates.io, bump version UI test cleanup: Extract ifs_same_cond tests UI test cleanup: Extract for_kv_map lint tests Fix test for rust-lang/rust#57250 Limit infinite_iter collect() check to known types Some improvements to util documentation Use hashset for name blacklist Reformat random_state tests Use node_id_to_type_opt instead of node_it_to_type in random_state Check pattern equality while checking declaration equality random_state lint Use an FxHashSet for valid idents in documentation lint Fix suggestion for unnecessary_ref lint Update CONTRIBUTING.md for rustfix tests Update .fixed files via update-references.sh Run rustfix on first UI test Use WIP branch for compiletest_rs ```` Also updates RLS and removes the patching of rustc_tool_utils from cargo.toml RLS changes: ```` update clippy hash and rustc_tools_util and use rustc_tools_util from crates.io Work around https://github.com/rust-lang/rust/pull/55937 Update Clippy... again Update Clippy Update clippy ```` r? @oli-obk
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-07Rollup merge of #57308 - Zoxc:controller-sync, r=michaelwoeristerPietro Albini-3/+4
Make CompileController thread-safe
2019-01-06Make sure feature gate errors are recoverable (take 2)Vadim Petrochenkov-13/+10
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-05Rollup merge of #57343 - Xanewok:querify-access-levels, r=nikomatsakiskennytm-7/+5
Calculate privacy access only via query Initially converted to query in https://github.com/rust-lang/rust/commit/a9f6babcda1479f4e5566d1aadbf9a0d99aa3182 and then changed to respect dependencies https://github.com/rust-lang/rust/commit/8281e883dd12260f00ce650aa8824507d9c447af. I did this as an effort to prune `CrateAnalysis` from librustc_save_analysis, with the only thing remaining being the glob map (`name` is unused, existing `crate_name` is exposed in the compiler passes, instead). Since calculating the glob map is opt-in, it'd be great if we could calculate that on-demand. However, it seems that it'd require converting resolution to queries, which I'm not sure how to do yet. In an effort to get rid of `CrateAnalysis` altogether, could we try unconditionally calculating the glob_map in the resolver, thus completely removing `CrateAnalysis` struct, and doing a perf run? r? @nikomatsakis cc @petrochenkov do you have any idea how/if at all could we querify the resolver? I've stumbled upon a comment that's ~3? years old at the moment, so I'm guessing things might have changed and it actually may be feasible now. https://github.com/rust-lang/rust/blob/fe0c10019d7ee96909cc42cc265ef999a6b5dd70/src/librustc_driver/driver.rs#L589-L593
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-04Remove unused name from CrateAnalysisIgor Matuszewski-1/+0
2019-01-04Replace CrateAnalysis::access_levels with queryIgor Matuszewski-6/+5
2019-01-03Make CompileController thread-safeJohn Kåre Alsaker-3/+4
2019-01-02remove outdated `rustc_driver` testsNiko Matsakis-51/+0
they are subsumed by `hr-subtype/hr-subtype.rs` and other tests
2019-01-02Remove now stray commentAlex Crichton-7/+0
2019-01-02Avoid using open_global_nowAlex Crichton-1/+1
2018-12-29Auto merge of #56225 - alexreg:type_alias_enum_variants, r=petrochenkovbors-1/+1
Implement RFC 2338, "Type alias enum variants" This PR implements [RFC 2338](https://github.com/rust-lang/rfcs/pull/2338), allowing one to write code like the following. ```rust #![feature(type_alias_enum_variants)] enum Foo { Bar(i32), Baz { i: i32 }, } type Alias = Foo; fn main() { let t = Alias::Bar(0); let t = Alias::Baz { i: 0 }; match t { Alias::Bar(_i) => {} Alias::Baz { i: _i } => {} } } ``` Since `Self` can be considered a type alias in this context, it also enables using `Self::Variant` as both a constructor and pattern. Fixes issues #56199 and #56611. N.B., after discussing the syntax for type arguments on enum variants with @petrochenkov and @eddyb (there are also a few comments on the [tracking issue](https://github.com/rust-lang/rust/issues/49683)), the consensus seems to be treat the syntax as follows, which ought to be backwards-compatible. ```rust Option::<u8>::None; // OK Option::None::<u8>; // OK, but lint in near future (hard error next edition?) Alias::<u8>::None; // OK Alias::None::<u8>; // Error ``` I do not know if this will need an FCP, but let's start one if so.
2018-12-29Replace LockCell with atomic typesJohn Kåre Alsaker-2/+3
2018-12-28Auto merge of #57118 - Zoxc:query-stats, r=wesleywiserbors-0/+4
Add a command line flag to print some query stats r? @michaelwoerister
2018-12-27Get rid of `Block::recovered`Vadim Petrochenkov-4/+2
2018-12-27Do not abort compilation if expansion produces errorsVadim Petrochenkov-10/+0
Fix a number of uncovered deficiencies in diagnostics
2018-12-26Store `Ident` rather than just `Name` in HIR types `Item` and `ForeignItem`.Alexander Regueiro-1/+1
2018-12-25Remove licensesMark Rousskov-80/+0
2018-12-25Add a command line flag to print some query statsJohn Kåre Alsaker-0/+4
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-13/+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-13/+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-22/+10
Make the 'a lifetime on TyCtxt useless cc @rust-lang/compiler r? @nikomatsakis
2018-12-19Rollup merge of #56918 - ljedrz:profiler_nits, r=wesleywiserPietro Albini-62/+57
Profiler: simplify total_duration, improve readability r? @wesleywiser
2018-12-19Rollup merge of #56663 - Zoxc:resolver-lifetime, r=pnkfelixPietro Albini-5/+5
Remove lifetime from Resolver
2018-12-18Remove now stray commentAlex Crichton-7/+0
2018-12-18Avoid using open_global_nowAlex Crichton-1/+1
2018-12-17profiler: improve readabilityljedrz-59/+56
2018-12-17profiler: simplify total_durationljedrz-3/+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-22/+10
2018-12-12Replace `FileSearch::for_each_lib_search_path` with `search_paths`.Nicholas Nethercote-1/+1
Returning an iterator leads to nicer code all around.
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-10Remove lifetime from ResolverJohn Kåre Alsaker-5/+5
2018-12-10Upgrade `smallvec` to 0.6.7 and use the new `may_dangle` feature.Nicholas Nethercote-1/+1
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-61/+57
2018-12-07Auto merge of #56502 - Zoxc:hir-func, r=eddybbors-15/+15
Use a function to access the Hir map to be able to turn it into a query later r? @eddyb
2018-12-07Auto merge of #56566 - ljedrz:fix_clippy_errors, r=cramertjbors-2/+2
codegen_utils, driver: fix clippy errors - remove a superfluous conversion - remove an explicit `return` - rename `MetadataOnlyCodegenBackend::new` to `::boxed` - single-arm `match` > `if let`
2018-12-07Rollup merge of #56434 - Zoxc:par-tests, r=michaelwoeristerkennytm-1/+1
Improve query cycle errors for parallel queries r? @michaelwoerister
2018-12-07Unsupport `#[derive(Trait)]` sugar for `#[derive_Trait]` legacy plugin ↵Vadim Petrochenkov-2/+0
attributes
2018-12-06FixJohn Kåre Alsaker-1/+1
2018-12-06codegen_utils, driver: fix clippy errorsljedrz-2/+2
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-15/+15