about summary refs log tree commit diff
path: root/src/librustc/session
AgeCommit message (Collapse)AuthorLines
2019-11-09Move next_node_id to ResolverMark Rousskov-20/+1
This doesn't migrate the pretty-printing everybody loops, which will be done in the next few commits.
2019-11-07Update for unstable option refactoring.Eric Huss-6/+2
2019-11-07Update built-in help for --extern.Eric Huss-1/+1
2019-11-07Stabilize --extern flag without a path.Eric Huss-7/+0
2019-11-06Rollup merge of #66027 - Mark-Simulacrum:panic-handler-query, r=alexcrichtonMazdak Farrokhzad-4/+0
Move has_panic_handler to query Moves us off of a global Once instead re-querying the lang item each time. The conditions on when we set it to true change a little (previously we'd make sure a few more lang items were `Some`) but I think they in practice don't matter, we won't compile later on if we don't have them.
2019-11-03Delete lint buffer from SessionMark Rousskov-40/+0
2019-11-03Move crate type checking laterMark Rousskov-1/+1
This allows us to directly pass in a lint buffer
2019-11-03Utilize Resolver lint buffer during HIR loweringMark Rousskov-4/+6
2019-11-01Move has_panic_handler to queryMark Rousskov-4/+0
2019-11-01Rollup merge of #65470 - traxys:fix_65401, r=michaelwoeristerTyler Mandry-0/+3
Don't hide ICEs from previous incremental compiles I think this fixes #65401, the compiler does not fail to ICE after the first compilation, tested on the last snippet of [this comment](https://github.com/rust-lang/rust/issues/63154#issuecomment-541592381). I am not very sure of the fix as I don't understand much of the structure of the compiler.
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-1/+1
This is done by moving some data definitions to syntax::expand.
2019-10-23Rollup merge of #65193 - Mark-Simulacrum:lockless-lintstore, r=nikomatsakisMazdak Farrokhzad-5/+6
Lockless LintStore This removes mutability from the lint store after registration. Each commit stands alone, for the most part, though they don't make sense out of sequence. The intent here is to move LintStore to a more parallel-friendly architecture, although also just a cleaner one from an implementation perspective. Specifically, this has the following changes: * We no longer implicitly register lints when registering lint passes * For the most part this means that registration calls now likely want to call something like: `lint_store.register_lints(&Pass::get_lints())` as well as `register_*_pass`. * In theory this is a simplification as it's much easier for folks to just register lints and then have passes that implement whichever lint however they want, rather than necessarily tying passes to lints. * Lint passes still have a list of associated lints, but a followup PR could plausibly change that * This list must be known for a given pass type, not instance, i.e., `fn get_lints()` is the signature instead of `fn get_lints(&self)` as before. * We do not store pass objects, instead storing constructor functions. This means we always get new passes when running lints (this happens approximately once though for a given compiler session, so no behavior change is expected). * Registration API is _much_ simpler: generally all functions are just taking `Fn() -> PassObject` rather than several different `bool`s.
2019-10-22Target-feature documented as unsafe. rustc book and rustc -C help have been ↵togiberlin-1/+2
modified.
2019-10-21Rollup merge of #65647 - nnethercote:rm-unnecessary-traits, r=CentrilMazdak Farrokhzad-6/+5
Remove unnecessary trait bounds and derivations This PR removes unnecessary trait bounds and derivations from many types. r? @nikomatsakis
2019-10-21Remove many unnecessary trait derivations.Nicholas Nethercote-6/+5
2019-10-19move parse_cfgspecs to rustc_interfaceMazdak Farrokhzad-772/+2
2019-10-17Create lint store during plugin registrationMark Rousskov-5/+6
Remove lint store from Session
2019-10-16Check if there are any delayed_span_bugs and abort incremental compilation ↵Quentin Boyer-0/+3
in this case
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-1/+1
2019-10-15syntax::parse::sess -> syntax::sessMazdak Farrokhzad-3/+4
2019-10-14Rollup merge of #65398 - estebank:capitalization-only, r=varkorTyler Mandry-1/+2
Bring attention to suggestions when the only difference is capitalization CC #65386.
2019-10-14Rollup merge of #65379 - Centril:refactor-bso_and_cc, r=petrochenkovMazdak Farrokhzad-183/+296
refactor session::config::build_session_options_and_crate_config I'm not exactly sure what happened in https://github.com/rust-lang/rust/pull/65361#issuecomment-541420179 so in an effort to bisect the error I'm extracting out the first commit so it can hopefully land (I suspect the error is in the 2nd-3rd commits.) r? @petrochenkov (I'll r=you when the PR builder is happy)
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-1/+2
2019-10-13Rollup merge of #65369 - tmiasko:sanitizers-keep-names, r=varkorMazdak Farrokhzad-1/+9
Don't discard value names when using address or memory sanitizer The value names are used when reporting issues found by address sanitizer or memory sanitizer. Avoid discarding names when those sanitizers are enabled, unless explicitly requested to do otherwise.
2019-10-13Rollup merge of #65214 - Amanieu:cfg_atomic, r=alexcrichtonMazdak Farrokhzad-11/+14
Split non-CAS atomic support off into target_has_atomic_load_store This PR implements my proposed changes in https://github.com/rust-lang/rust/issues/32976#issuecomment-518542029 by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s: * `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations). * ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS). cc #32976 r? @alexcrichton
2019-10-13refactor session::config::build_session_options_and_crate_configMazdak Farrokhzad-183/+296
2019-10-13Don't discard value names when using address or memory sanitizerTomasz Miąsko-1/+9
The value names are used when reporting issues found by address sanitizer or memory sanitizer. Avoid discarding names when those sanitizers are enabled, unless explicitly requested to do otherwise.
2019-10-10Auto merge of #59546 - sfanxiang:interminable-ub, r=nagisabors-0/+3
Add llvm.sideeffect to potential infinite loops and recursions LLVM assumes that a thread will eventually cause side effect. This is not true in Rust if a loop or recursion does nothing in its body, causing undefined behavior even in common cases like `loop {}`. Inserting llvm.sideeffect fixes the undefined behavior. As a micro-optimization, only insert llvm.sideeffect when jumping back in blocks or calling a function. A patch for LLVM is expected to allow empty non-terminate code by default and fix this issue from LLVM side. https://github.com/rust-lang/rust/issues/28728 **UPDATE:** [Mentoring instructions here](https://github.com/rust-lang/rust/pull/59546#issuecomment-515072429) to unstall this PR
2019-10-08Rollup merge of #65081 - Mark-Simulacrum:remove-profile-queries, ↵Mazdak Farrokhzad-17/+1
r=michaelwoerister Remove -Zprofile-queries r? @michaelwoerister Per [zulip thread](https://zulip-archive.rust-lang.org/131828tcompiler/57361RemoveZprofilequeries.html).
2019-10-08Split non-CAS atomic support off into target_has_atomic_load_storeAmanieu d'Antras-11/+14
2019-10-04Update the documented default of -Z mutable-noaliasJosh Stone-1/+1
It has been fully disabled by default since #54639.
2019-10-03Remove -Zprofile-queriesMark Rousskov-17/+1
2019-10-01Rollup merge of #64840 - michaelwoerister:self-profiling-raii-refactor, ↵Tyler Mandry-21/+3
r=wesleywiser SelfProfiler API refactoring and part one of event review This PR refactors the `SelfProfiler` a little bit so that most profiling methods are RAII-based. The codegen backend code already had something similar, this refactoring pulls this functionality up into `SelfProfiler` itself, for general use. The second commit of this PR is a review and update of the existing events we are already recording. Names have been made more consistent. CGU names have been removed from event names. They will be added back in when function parameter recording is implemented. There is still some work to be done for adding new events, especially around trait resolution and the incremental system. r? @wesleywiser
2019-10-01Rollup merge of #64722 - Mark-Simulacrum:alt-parallel, r=alexcrichtonTyler Mandry-10/+17
Make all alt builders produce parallel-enabled compilers We're not quite ready to ship parallel compilers by default, but the alt builders are not used too much (in theory), so we believe that shipping a possibly-broken compiler there is not too problematic. r? @nikomatsakis
2019-09-30Make the default parallelism 1Mark Rousskov-10/+17
This changes the default parallelism for parallel compilers to one, instead of the previous default, which was "num cpus". This is likely not an optimal default long-term, but it is a good default for testing whether parallel compilers are not a significant regression over a sequential compiler. Notably, this in theory makes a parallel-enabled compiler behave exactly like a sequential compiler with respect to the jobserver.
2019-09-30Self-Profiling: Refactor SelfProfiler API to be RAII based where possible.Michael Woerister-21/+3
2019-09-29Auto merge of #64158 - tmandry:libtest-panic-abort, r=alexcrichtonbors-0/+2
panic=abort support in libtest Add experimental support for tests compiled with panic=abort. Enabled with `-Z panic_abort_tests`. r? @alexcrichton cc @cramertj
2019-09-28Put panic=abort test support behind -Z panic_abort_testsTyler Mandry-0/+2
2019-09-28Trigger ICE on nightly if validators disagreeDylan MacKenzie-0/+2
Also adds an unstable flag to disable the ICE (`-Zsuppress-const-validation-back-compat-ice`) so that nightly users do not have to revert to a previous nightly if their code causes disagreement between the validators.
2019-09-28Gate llvm.sideeffect under -Z insert-sideeffectXiang Fan-0/+3
2019-09-27cleanup dead ast-borrowck / migrate-mode code.Mazdak Farrokhzad-8/+0
2019-09-27Remove unpretty=flowgraph.Mazdak Farrokhzad-18/+0
2019-09-26Rename `MetaItem.node` to `MetaItem.kind`varkor-1/+1
2019-09-26Rename `Lit.node` to `Lit.kind`varkor-1/+1
2019-09-25Rollup merge of #64324 - alexcrichton:share-generics-again, r=michaelwoeristerMazdak Farrokhzad-4/+1
rustc: Fix mixing crates with different `share_generics` This commit addresses #64319 by removing the `dylib` crate type from the list of crate type that exports generic symbols. The bug in #64319 arises because a `dylib` crate type was trying to export a symbol in an uptream crate but it miscalculated the symbol name of the uptream symbol. This isn't really necessary, though, since `dylib` crates aren't that heavily used, so we can just conservatively say that the `dylib` crate type never exports generic symbols, forcibly removing them from the exported symbol lists if were to otherwise find them. The fix here happens in two places: * First is in the `local_crate_exports_generics` method, indicating that it's now `false` for the `Dylib` crate type. Only rlibs actually export generics at this point. * Next is when we load exported symbols from upstream crate. If, for our compilation session, the crate may be included from a dynamic library, then its generic symbols are removed. When the crate was linked into a dynamic library its symbols weren't exported, so we can't consider them a candidate to link against. Overally this should avoid situations where we incorrectly calculate the upstream symbol names in the face of differnet `share_generics` options, ultimately... Closes #64319
2019-09-23rustc: Convert `dependency_formats` to a queryAlex Crichton-4/+1
This commit converts a field of `Session`, `dependency_formats`, into a query of `TyCtxt`. This information then also needed to be threaded through to other remaining portions of the linker, but it's relatively straightforward. The only change here is that instead of `HashMap<CrateType, T>` the data structure changed to `Vec<(CrateType, T)>` to make it easier to deal with in queries.
2019-09-23Introduce a diagnostic stashing API.Mazdak Farrokhzad-0/+1
2019-09-17Protect error handler fields with single lockMark Rousskov-3/+3
This avoids concurrency-related bugs when locks are acquired for too short a time and similar cases.
2019-09-17Remove unused methods from HandlerMark Rousskov-6/+0
2019-09-17Remove Handler::{emit, emit_with_code}Mark Rousskov-2/+2