about summary refs log tree commit diff
path: root/src/librustc/session
AgeCommit message (Collapse)AuthorLines
2018-01-29Toggle span highlighting on `-Zteach`Esteban Küber-8/+11
2018-01-29Use correct output file paths for error checkingvarkor-39/+0
2018-01-29Warn when rustc output conflicts with existing directoriesvarkor-9/+29
When the compiled executable would conflict with a directory, display a rustc error instead of a verbose and potentially-confusing linker error. This is a usability improvement, and doesn’t actually change behaviour with regards to compilation success. This addresses the concern in #35887.
2018-01-29Add -Zapproximate-suggestionsManish Goregaokar-2/+6
2018-01-26Merge branch 'explain' of https://github.com/estebank/rust into rollupAlex Crichton-2/+7
2018-01-26Merge branch 'no-stderr-sink' of https://github.com/Zoxc/rust into rollupAlex Crichton-9/+9
2018-01-26Do not capture stderr in the compiler. Instead just panic silently for fatal ↵John Kåre Alsaker-9/+9
errors
2018-01-23rustc: Add `-C lto=val` optionAlex Crichton-45/+103
This commit primarily adds the ability to control what kind of LTO happens when rustc performs LTO, namely allowing values to be specified to the `-C lto` option, such as `-C lto=thin` and `-C lto=fat`. (where "fat" is the previous kind of LTO, throw everything in one giant module) Along the way this also refactors a number of fields which store information about whether LTO/ThinLTO are enabled to unify them all into one field through which everything is dispatched, hopefully removing a number of special cases throughout. This is intended to help mitigate #47409 but will require a backport as well, and this would unfortunately need to be an otherwise insta-stable option.
2018-01-23Rename `-Z explain` to `-Z teach`Esteban Küber-3/+3
2018-01-23Create `StructuredDiagnostic`Esteban Küber-0/+4
Create the concept of an `StructuredDiagnostic` that is self-contained with enough knowledge of all variables to create a `DiagnosticBuilder`, including different possible versions (one line output and expanded explanations).
2018-01-23Rollup merge of #47635 - Zoxc:remove-attr, r=michaelwoeristerkennytm-0/+6
Remove the IGNORED_ATTR_NAMES thread local
2018-01-23Rollup merge of #47440 - mark-i-m:zunpretty, r=nikomatsakiskennytm-12/+24
Change the --unpretty flag to -Z unpretty First PR :smile: ! -Z unpretty no longer requires -Z unstable-options. Also, I mildly changed the syntax of the flag to match the other -Z flags. All uses of the flag take the form `unpretty=something` where something can either `string` or `string=string` (see the help messages of the CLI). Fix #47395 r? @nikomatsakis EDIT: apparently rust-highfive doesn't see edits...
2018-01-22Don't make it necessary to enable `unstable-options`Esteban Küber-4/+0
2018-01-22Fix test for variadic error changeEsteban Küber-1/+1
2018-01-22Mark `--explain` as unstableEsteban Küber-2/+5
2018-01-22Add `--explain` for extended error explanationsEsteban Küber-0/+2
2018-01-21Remove the IGNORED_ATTR_NAMES thread localJohn Kåre Alsaker-0/+6
2018-01-19Allow runtime switching between trans backendsbjorn3-0/+2
2018-01-19Auto merge of #47494 - michaelwoerister:proc-macro-incremental, r=nikomatsakisbors-9/+7
Don't include DefIndex in proc-macro registrar function symbol. There can only ever be one registrar function per plugin or proc-macro crate, so adding the `DefIndex` to the function's symbol name does not serve a real purpose. Remove the `DefIndex` from the symbol name makes it stable across incremental compilation sessions. This should fix issue #47292.
2018-01-18Change the --unpretty flag to -Z unprettyMark Mansi-12/+24
-Z unpretty no longer requires -Z unstable-options. Also, I mildly changed the syntax of the flag to match the other -Z flags. All uses of the flag take the form `unpretty=something` where something can either `string` or `string=string` (see the help messages of the CLI).
2018-01-18Rollup merge of #47426 - varkor:default-mir-dump-dir, r=nikomatsakiskennytm-2/+2
Add a default directory for -Zmir-dump-dir The current behaviour of dumping in the current directory is rarely desirable: a sensible default directory for dumping is much more convenient. This makes sets the default value for `-Zmir-dump-dir` to `mir_dump/`. r? @eddyb
2018-01-16Don't include DefIndex in plugin- and proc-macro registrar fn symbol.Michael Woerister-9/+7
2018-01-15Add `-Z dep-info-omit-d-target` to control dep-info styleAdam C. Foltzer-0/+3
This avoids a breaking change to dep-info output, putting the gcc/clang-compliant dep-info behavior behind a flag
2018-01-15Fix testvarkor-1/+1
2018-01-14Make dump_mir_dir non-optionalvarkor-1/+1
2018-01-14Add a default directory for -Zmir-dump-dirvarkor-1/+1
The current behaviour of dumping in the current directory is rarely desirable: a sensible default directory for dumping is much more convenient.
2018-01-13Auto merge of #47181 - michaelwoerister:var-len-def-index, r=eddybbors-2/+2
Use DefIndex encoding that works better with on-disk variable length integer representations. Use the least instead of the most significant bit for representing the address space. r? @eddyb
2018-01-09Auto merge of #47269 - michaelwoerister:mangled-cgu-names, r=alexcrichtonbors-0/+2
Shorten names of some compiler generated artifacts. This PR makes the compiler mangle codegen unit names by default. The name of every codegen unit name will now be a random string of 16 characters. It also makes the file extensions of some intermediate compiler products shorter. Hopefully, these changes will reduce the pressure on tools with path length restrictions like buildbot. The change should also solve problems with case-insensitive file system. cc #47186 and #47222 r? @alexcrichton
2018-01-08Use different DefIndex representation that is better suited for variable ↵Michael Woerister-2/+2
length integer encodings.
2018-01-08Shorten names of some compiler generated artifacts.Michael Woerister-0/+2
2018-01-07Remove redundant -Zdebug-llvm optionBjörn Steinbrink-4/+0
The same effect can be achieved using -Cllvm-args=-debug Refs #46437 as it removes LLVMRustSetDebug()
2018-01-07Rollup merge of #47220 - nagisa:nonamellvm, r=rkruppekennytm-1/+14
Use name-discarding LLVM context This is only applicable when neither of --emit=llvm-ir or --emit=llvm-bc are not requested. In case either of these outputs are wanted, but the benefits of such context are desired as well, -Zfewer_names option provides the same functionality regardless of the outputs requested. Should be a viable fix for https://github.com/rust-lang/rust/issues/46449
2018-01-05rustc: Don't ICE if we invalidate an invalid incr dirAlex Crichton-0/+1
This showed up on the Windows bot for testing this PR, and this pr allows `mark_incr_comp_session_as_invalid` ok if it's already invalid, hopefully avoiding scary ICEs and instead leaving the nicely printed errors
2018-01-05Use name-discarding LLVM contextSimonas Kazlauskas-1/+14
This is only applicable when neither of --emit=llvm-ir or --emit=llvm-bc are not requested. In case either of these outputs are wanted, but the benefits of such context are desired as well, -Zfewer_names option provides the same functionality regardless of the outputs requested.
2017-12-26avoid ICE when fields are not laid out in orderNiko Matsakis-5/+13
2017-12-25Auto merge of #46910 - alexcrichton:thinlto-default, r=michaelwoeristerbors-4/+1
rustc: Set release mode cgus to 16 by default This commit is the next attempt to enable multiple codegen units by default in release mode, getting some of those sweet, sweet parallelism wins by running codegen in parallel. Performance should not be lost due to ThinLTO being on by default as well. Closes #45320
2017-12-23rustc: Set release mode cgus to 16 by defaultAlex Crichton-4/+1
This commit is the next attempt to enable multiple codegen units by default in release mode, getting some of those sweet, sweet parallelism wins by running codegen in parallel. Performance should not be lost due to ThinLTO being on by default as well. Closes #45320
2017-12-22Auto merge of #46779 - Zoxc:par-merge-without-sync, r=arielb1bors-0/+12
Work towards thread safety in rustc This PR is split out from https://github.com/rust-lang/rust/pull/45912. It contains changes which do not require the `sync` module.
2017-12-22Rollup merge of #46814 - varkor:contrib-7, r=alexcrichtonkennytm-0/+25
Prevent rustc overwriting input files If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019. Kudos to @estebank, whose patch I finished off.
2017-12-21Add a -Z query-threads compiler optionJohn Kåre Alsaker-0/+12
2017-12-20document and tweak the nll, use_mir, etc helpersNiko Matsakis-3/+27
In particular, -Znll might as well imply -Zborrowck=mir by default, just like `#![feature(nll)]` does. Also, if NLL is in use, no reason to emit end regions. The NLL pass just strips them out anyway.
2017-12-20feature nll implies borrowck=mirSantiago Pastorino-2/+20
2017-12-20feature nll implies two-phase-borrowsSantiago Pastorino-0/+3
2017-12-20Add nll feature and make nll imply nll_dump_causeSantiago Pastorino-0/+3
2017-12-20Add nll_dump_cause helper to SessionSantiago Pastorino-0/+3
2017-12-20dump out causal information for "free region" errorsNiko Matsakis-0/+2
The result is not especially illuminating, but that's ok.
2017-12-20Rollup merge of #46751 - michaelwoerister:c-incremental, r=alexcrichtonkennytm-3/+23
incr.comp.: Add `-C incremental` in addition to `-Z incremental` This PR adds a stable commandline option for invoking incremental compilation. r? @alexcrichton
2017-12-18Prevent rustc overwriting input filesvarkor-0/+25
If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019.
2017-12-18incr.comp.: Add -Cincremental in addition to -ZincrementalMichael Woerister-3/+23
2017-12-15Rollup merge of #46728 - varkor:contrib-4, r=michaelwoeristerSteve Klabnik-3/+7
Fix division-by-zero ICE in -Z perf-stats An invalid average now simply prints “N/A”. Fixes #46725.