summary refs log tree commit diff
path: root/compiler/rustc_driver/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2021-07-02Auto merge of #80182 - in42:stack_trace, r=tmandrybors-0/+50
Implement printing of stack traces on LLVM segfaults and aborts Implement #79153 Based on discussion, try to extend the rust_backtrace=1 feature to handle segfault or aborts in the llvm backend
2021-07-02Use signal handler only on supported platformsTyler Mandry-37/+42
2021-07-01Auto merge of #86757 - JohnTitor:rollup-acevhz7, r=JohnTitorbors-4/+13
Rollup of 8 pull requests Successful merges: - #85504 (the foundation owns rust trademarks) - #85520 (Fix typo and improve documentation for E0632) - #86680 (Improve error for missing -Z with debugging option) - #86728 (Check node kind to avoid ICE in `check_expr_return()`) - #86740 (copy rust-lld as ld in dist) - #86746 (Fix rustdoc query type filter) - #86750 (Test cross-crate usage of `feature(const_trait_impl)`) - #86755 (alloc: `RawVec<T, A>::shrink` can be in `no_global_oom_handling`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-06-30Fix AST pretty.Camille GILLOT-2/+2
2021-06-30Move AST crate.Camille GILLOT-9/+2
2021-06-30Add suggestion for missing compile flag groupCameron Steffen-4/+13
2021-06-25Auto merge of #85640 - bjorn3:custom_ice_hook, r=jackh726bors-8/+11
Allow changing the bug report url for the ice hook cc https://github.com/bjorn3/rustc_codegen_cranelift/issues/1174
2021-06-22Teach rustc to accept lowercase error codesAris Merchant-2/+6
2021-06-16Small fixesTyler Mandry-11/+11
2021-06-16Implement printing of stack traces on LLVM segfaults and abortsVikram Pal-0/+45
2021-06-04Rustfmtbjorn3-1/+5
2021-06-04Support --version and -Cpasses=list for other codegen backendsbjorn3-4/+16
2021-06-04Allow printing the version of the default codegen backend if it isn't llvmbjorn3-7/+3
2021-06-04Turn a regular comment on Compilation into a doc commentbjorn3-1/+1
2021-05-24Don't invoke the default panic hook from report_icebjorn3-8/+11
2021-05-12Use () for analysis.Camille GILLOT-2/+1
2021-05-12Auto merge of #83610 - bjorn3:driver_cleanup, r=cjgillotbors-114/+86
rustc_driver cleanup Best reviewed one commit at a time.
2021-05-03Run save_analysis even when analysis returned an errorbjorn3-2/+2
2021-05-02Move queries.crate_name()bjorn3-3/+3
2021-05-02Simplify make_inputbjorn3-22/+21
2021-05-02Remove unnecessary argumentbjorn3-4/+1
2021-05-02Tiny cleanupbjorn3-3/+2
2021-05-02Inline process_rlink into try_process_rlinkbjorn3-20/+17
2021-05-02Document a few thingsbjorn3-2/+12
2021-05-02Remove dummy_configbjorn3-64/+38
2021-04-06Rollup merge of #83895 - eggyal:issue-83883, r=jyn514Dylan DPC-1/+2
Add listing of lints (eg via `-W help`) to rustdoc Fixes #83883 r? `@jyn514`
2021-04-06Add listing of lints (eg via -W help) to rustdocAlan Egerton-1/+2
2021-04-06Auto merge of #81641 - bjorn3:find_codegen_backend, r=davidtwcobors-2/+2
Find codegen backends in more locations * Search in the sysroot passed using `--sysroot` in addition to the default sysroot. * Search for `librustc_codegen_$name.so` in addition to `librustc_codegen_$name-$release.so`. This combined would allow putting `librustc_codegen_cranelift.so` in the right location of a sysroot passed using `--sysroot`.
2021-03-30Merge two consecutive tcx.analysis() callsbjorn3-11/+7
2021-03-27Address review commentsJoshua Nelson-4/+3
- Add back `HirIdVec`, with a comment that it will soon be used. - Add back `*_region` functions, with a comment they may soon be used. - Remove `-Z borrowck_stats` completely. It didn't do anything. - Remove `make_nop` completely. - Add back `current_loc`, which is used by an out-of-tree tool. - Fix style nits - Remove `AtomicCell` with `cfg(parallel_compiler)` for consistency.
2021-03-27Remove (lots of) dead codeJoshua Nelson-3/+7
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
2021-03-22Change `-W help` to display edition level.Eric Huss-1/+6
2021-03-15Add `rustc_interface::interface::Config::parse_sess_created`hyd-dev-0/+2
2021-02-20Auto merge of #82341 - GuillaumeGomez:rollup-t7y7tyg, r=GuillaumeGomezbors-1/+1
Rollup of 7 pull requests Successful merges: - #80595 (`impl PartialEq<Punct> for char`; symmetry for #78636) - #81991 (Fix panic in 'remove semicolon' when types are not local) - #82176 (fix MIR fn-ptr pretty-printing) - #82244 (Keep consistency in example for Stdin StdinLock) - #82260 (rustc: Show ``@path`` usage in stable) - #82316 (Fix minor mistake in LTO docs.) - #82332 (Don't generate src link on dummy spans) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-02-20Rollup merge of #82260 - ojeda:rustc-argfile, r=jyn514Guillaume Gomez-1/+1
rustc: Show `@path` usage in stable The feature was stabilized in #66172, but the usage string was not updated to be shown.
2021-02-19Move try_print_query_stack to rustc_interface.Camille GILLOT-2/+1
2021-02-19Rollup merge of #82261 - ojeda:rustdoc-argfile, r=jyn514Dylan DPC-11/+3
rustdoc: Support argument files Factors out the `rustc_driver` logic that handles argument files so that rustdoc supports them as well, e.g.: rustdoc `@argfile` This is needed to be able to generate docs for projects that already use argument files when compiling them, e.g. projects that pass a huge number of `--cfg` arguments. The feature was stabilized for `rustc` in #66172.
2021-02-19rustdoc: Support argument filesMiguel Ojeda-11/+3
Factors out the `rustc_driver` logic that handles argument files so that rustdoc supports them as well, e.g.: rustdoc @argfile This is needed to be able to generate docs for projects that already use argument files when compiling them, e.g. projects that pass a huge number of `--cfg` arguments. The feature was stabilized for `rustc` in #66172. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-02-18rustc: Show `@path` usage in stableMiguel Ojeda-1/+1
The feature was stabilized in #66172, but the usage string was not updated to be shown. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-02-01Find codegen backends in more locationsbjorn3-2/+2
* Search in the sysroot passed using `--sysroot` in addition to the default sysroot. * Search for `librustc_codegen_$name.so` in addition to `librustc_codegen_$name-$release.so`.
2021-01-29Indicate both start and end of pass RSS in time-passes outputTyson Nottingham-4/+9
Previously, only the end of pass RSS was indicated. This could easily lead one to believe that the change in RSS from one pass to the next was attributable to the second pass, when in fact it occurred between the end of the first pass and the start of the second. Also, improve alignment of columns.
2021-01-15Rollup merge of #80944 - LingMan:map_or, r=nagisaYuki Okushi-1/+1
Use Option::map_or instead of `.map(..).unwrap_or(..)` ``@rustbot`` modify labels +C-cleanup +T-compiler
2021-01-14Use Option::map_or instead of `.map(..).unwrap_or(..)`LingMan-1/+1
2021-01-14Rollup merge of #80981 - bjorn3:bjorn3-patch-1, r=jonas-schievinkMara Bos-2/+2
Fix -Cpasses=list and llvm version print with -vV cc https://github.com/rust-lang/rust/pull/77975#issuecomment-759362933
2021-01-13Fix -Cpasses=list and llvm version print with -vVbjorn3-2/+2
2021-01-11driver: Use `atty` instead of rolling our ownCamelid-33/+2
Rationale: - `atty` is widely used in the Rust ecosystem - We already use it (in `rustc_errors` and other places) - We shouldn't be rolling our own TTY detector when there's a widely-used, well-tested package that we can use
2021-01-10log-color: Detect TTY based on stderr, not stdoutCamelid-2/+21
Logging goes to stderr, not stdout, so we should base our automated detection on stderr instead of stdout. Thanks to Ralf Jung for noticing and reporting the bug!
2020-12-30where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)Matthias Krüger-1/+1
2020-12-01Fix `unknown-crate` when using self-profile with rustdocJoshua Nelson-2/+0
... by removing a duplicate `crate_name` field in `interface::Config`, making it clear that rustdoc should be passing it to `config::Options` instead.
2020-11-26Auto merge of #77671 - flip1995:lint_list_always_plugins, r=oli-obk,Manishearthbors-6/+10
Always print lints from plugins, if they're available Currently you can get a list of lints and lint groups by running `rustc -Whelp`. This prints an additional line at the end: ``` Compiler plugins can provide additional lints and lint groups. To see a listing of these, re-run `rustc -W help` with a crate filename. ``` Clippy is such a "compiler plugin", that provides additional lints. Running `clippy-driver -Whelp` (`rustc` wrapper) still only prints the rustc lints with the above message at the end. But when running `clippy-driver -Whelp main.rs`, where `main.rs` is any rust file, it also prints Clippy lints. I don't think this is a good approach from a UX perspective: Why is a random file necessary to print a help message? This PR changes this behavior: Whenever a compiler callback registers lints, it is assumed that these lints come from a plugin and are printed without having to specify a Rust source file. Fixes rust-lang/rust-clippy#6122 cc `@Manishearth` `@ebroto` for the Clippy changes.