summary refs log tree commit diff
path: root/src/librustc_session/session.rs
AgeCommit message (Collapse)AuthorLines
2020-04-19Replace uses of `parse_opt_*` with `parse_*` where possible.Nicholas Nethercote-4/+4
This lets us specify the default at the options declaration point, instead of using `.unwrap(default)` or `None | Some(default)` at some use point far away. It also makes the code more concise.
2020-04-04Auto merge of #69718 - arlosi:debughash, r=eddybbors-26/+30
Add hash of source files in debug info LLVM supports placing the hash of source files inside the debug info. This information can be used by a debugger to verify that the source code matches the executable. This change adds support for both hash algorithms supported by LLVM, MD5 and SHA1, controlled by a target option. * DWARF only supports MD5 * LLVM IR supports MD5 and SHA1 (and SHA256 in LLVM 11). * CodeView (.PDB) supports MD5, SHA1, and SHA256. Fixes #68980. Tracking issue: #70401 rustc dev guide PR with further details: https://github.com/rust-lang/rustc-dev-guide/pull/623
2020-04-03Auto merge of #70156 - michaelwoerister:incr-cgus, r=nikomatsakisbors-0/+7
Make the rustc respect the `-C codegen-units` flag in incremental mode. This PR implements (the as of yet unapproved) major change proposal at https://github.com/rust-lang/compiler-team/issues/245. See the description there for background and rationale. The changes are pretty straightforward and should be easy to rebase if the proposal gets accepted at some point. r? @nikomatsakis cc @pnkfelix
2020-04-02Add hash of source files in debug infoArlo Siemsen-26/+30
* Adds either an MD5 or SHA1 hash to the debug info. * Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
2020-04-02Translate the virtual `/rustc/$hash` prefix back to a real directory.Eduard-Mihai Burtescu-0/+30
2020-03-31Make the rustc respect the `-C codegen-units` flag in incremental mode.Michael Woerister-0/+7
Before this commit `-C codegen-units` would just get silently be ignored if `-C incremental` was specified too. After this commit one can control the number of codegen units generated during incremental compilation. The default is rather high at 256, so most crates won't see a difference unless explicitly opting into a lower count.
2020-03-23query normalize_generic_arg_after_erasing_regionsBastian Kauschke-4/+4
2020-03-21move CrateDisambiguator -> rustc_astMazdak Farrokhzad-49/+10
2020-03-17Auto merge of #69519 - 12101111:remove-proc-macro-check, r=nagisabors-8/+17
Don't use static crt by default when build proc-macro Don't check value of `crt-static` when build proc-macro crates, since they are always built dynamically. For more information, see https://github.com/rust-lang/cargo/issues/7563#issuecomment-591965320 I hope this will fix issues about compiling `proc_macro` crates on musl host without bring more issues. Fix https://github.com/rust-lang/cargo/issues/7563
2020-03-14rustc_metadata: Remove `rmeta::MacroDef`Vadim Petrochenkov-6/+0
Use `ast::MacroDef` instead. Also remove `Session::imported_macro_spans`, external macros have spans now.
2020-03-10[Miri] Use a session variable instead of checking for an env var alwaysWesley Wiser-0/+24
In CTFE heavy code, checking the env var everytime is inefficient. We can do a lot better by using a `Session` variable instead.
2020-03-10When `crate_type` is `None`,check compiler options12101111-1/+1
2020-03-08Simplify checking of crt_static_feature()12101111-26/+10
2020-03-05Add a new test to reach const_limit setting, although with wrong WARNINGs yetChristoph Schmidler-2/+2
rename feature to const_eval_limit
2020-03-05Prepare const_limit feature gate and attributeChristoph Schmidler-0/+4
2020-03-03Run format.12101111-1/+1
2020-03-03Don't use static crt by default when build proc-macro.12101111-8/+33
2020-02-19Tune inliningJohn Kåre Alsaker-0/+1
2020-02-09Make issue references consistentMatthias Prechtl-1/+2
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-6/+6
2020-02-05Auto merge of #67429 - mati865:mingw-ultimate-fix, r=alexcrichtonbors-0/+5
windows-gnu: prefer system crt libraries if they are available The origin of the issue is the fact Rust ships mingw-w64 libraries but no headers and prefers own libraries over the system ones. This leads to situation when headers aren't compatible with libraries (mingw-w64 doesn't provide any forward compatibility and AFAIK backwards compatibility is guaranteed only within major release series). It's easier to understand how this PR works when looking at the linker invocation before and with this PR: https://www.diffchecker.com/GEuYFmzo It adds system libraries path before Rust libraries so the linker will prefer them. It has potential issue when system has files with the same names as Rust but that could be avoided by moving Rust shipped mingw-w64 libraries from `lib/rustlib/x86_64-pc-windows-gnu/lib` to say `lib/rustlib/x86_64-pc-windows-gnu/lib/mingw`. Then adding linker paths in this order: Rust libraries, system libraries, Rust shipped mingw-w64 libraries. Fixes #47048 Fixes #49078 Fixes #53454 Fixes #60912
2020-02-04Prefer system MinGW libs when availableMateusz Mikuła-0/+5
2020-02-04remove redundant imports (clippy::single_component_path_imports)Matthias Krüger-1/+0
2020-01-22Fix tidy warningsAaron Green-2/+6
2020-01-22Enable ASan on FuchsiaAaron Green-1/+1
This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to those allowed to invoke -Zsanitizer. Currently, the only overlap between compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
2020-01-09Link sanitizer runtimes instead of injecting crate dependenciesTomasz Miąsko-0/+26
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-5/+8
2020-01-03rustdoc: Respect diagnostic debugging optionsVadim Petrochenkov-14/+1
2020-01-03Introduce an option for disabling deduplication of diagnosticsVadim Petrochenkov-3/+2
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-3/+3
2019-12-30Support `-Z ui-testing=yes/no`Vadim Petrochenkov-4/+4
2019-12-22Format the worldMark Rousskov-201/+120
2019-12-17Revert "Auto merge of #67362 - Mark-Simulacrum:par-4-default, r=alexcrichton"Mark Rousskov-3/+3
This reverts commit 3ed3b8bb7b100afecf7d5f52eafbb70fec27f537, reversing changes made to 99b89533d4cdf7682ea4054ad0ee36c351d05df1. We will reland a similar patch at a future date but for now we should get a nightly released in a few hours with the parallel patch, so this should be reverted to make sure that the next nightly is not parallel-enabled.
2019-12-17Move AtomicU64 usage to AtomicUsizeMark Rousskov-3/+3
2019-12-06Use `as_ref().map()` rather than `is_some().to_option()`varkor-1/+1
2019-12-06Use `to_option_with` in several placesvarkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-7/+4
2019-12-03Move Session to librustc_sessionMark Rousskov-0/+1299