about summary refs log tree commit diff
path: root/src/librustc/session
AgeCommit message (Collapse)AuthorLines
2018-07-25introduce new subtypingNiko Matsakis-0/+2
2018-07-20Make sure the compiler actually panics on `delay_span_bug`Oliver Schneider-0/+8
Even if that is just happening because of `abort_if_errors`
2018-07-16Revert "Clean up CodegenUnit name generation."Michael Woerister-9/+0
This reverts commit 2c5cd9ce53d2d25041db0cb02b40ba460ffa8908.
2018-07-11Clean up CodegenUnit name generation.Michael Woerister-0/+9
2018-07-11Auto merge of #51230 - nikic:no-verify-lto, r=pnkfelixbors-5/+5
Disable LLVM verification by default Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO. Also wondering what the sentiment is on disabling verification by default (and e.g. only enabling it on ALT builds with assertions). This does not seem terribly useful outside of rustc development and it does seem to show up in profiles (at something like 3%). **EDIT:** A table showing the various configurations and what is enabled when. | Configuration | Dynamic verification performed | LLVM static assertions compiled in | | --- | --- | --- | | alt builds | | yes | | nightly builds | | no | | stable builds | | no | | CI builds | | | | dev builds in a checkout | | |
2018-07-09Auto merge of #51956 - GuillaumeGomez:shutdown-doc-lints, r=oli-obkbors-1/+5
Fix rustdoc run failures by shutting down definitely some lints Fixes #51661. cc @oli-obk @arielb1 @eddyb
2018-07-07Auto merge of #52109 - michaelwoerister:ir-objs, r=alexcrichtonbors-7/+4
When doing linker-plugin based LTO, write LLVM bitcode obj-files instead of embedding the bitcode into the regular object file. This PR makes the compiler emit LLVM bitcode object files instead of regular object files with the IR embed when compiling for linker-plugin-based LTO. The reasoning for switching the strategy is this: - Embedding bitcode in a section of the object file actually makes us save bitcode twice in rlibs and Rust dylibs, once for linker-based LTO and once for rustc-based LTO. That's a waste of space. - When compiling for plugin-based LTO, one usually has no use for the machine code also present in the object file. Generating it is a waste of time. - When compiling for plugin-based LTO, `rustc` will skip running ThinLTO because the linker will do that anyway. This has the side effect of then generating poorly optimized machine code, which makes it even less useful (and may lead to users not knowing why their code is slow instead of getting an error). - Not having machine code available makes it impossible for the linker to silently fall back to not inlining stuff across language boundaries. - This is what Clang does and according to [the documentation](https://llvm.org/docs/BitCodeFormat.html#native-object-file-wrapper-format) is the better supported option. - The current behavior (minus the runtime performance problems) is still available via `-Z embed-bitcode` (we might want to do this for `libstd` at some point). r? @alexcrichton
2018-07-06Rollup merge of #52099 - zackmdavis:and_the_case_of_the_typ, r=oli-obkMark Rousskov-1/+1
fix typo in stable `--edition` error message (diff is self-explanatory)
2018-07-06Remove CrossLangLto::NoLink which does not have a use case anymore.Michael Woerister-6/+3
2018-07-06When doing linker-plugin based LTO, write LLVM bitcode obj-filesMichael Woerister-1/+1
instead of embedding the bitcode into the regular object file.
2018-07-06Auto merge of #51953 - japaric:atomic-load-store, r=alexcrichtonbors-0/+4
enable Atomic*.{load,store} for ARMv6-M / MSP430 closes #45085 as proposed in https://github.com/rust-lang/rust/issues/45085#issuecomment-384825434 this commit adds an `atomic_cas` target option and extends the `#[cfg(target_has_atomic)]` attribute to enable a subset of the `Atomic*` API on architectures that don't support atomic CAS natively, like MSP430 and ARMv6-M. r? @alexcrichton
2018-07-06Rollup merge of #52093 - alexcrichton:update-issue, r=kennytmkennytm-17/+24
rustc: Update tracking issue for wasm_import_module It's now https://github.com/rust-lang/rust/issues/52090
2018-07-05typo-fix stable ed'n error: "an onlyavailable" → "and only available"Zack M. Davis-1/+1
2018-07-06Rollup merge of #52019 - michaelwoerister:cross-lto-auto-plugin, r=alexcrichtonkennytm-1/+3
[cross-lang-lto] Allow the linker to choose the LTO-plugin (which is useful when using LLD) This PR allows for not specifying an LTO-linker plugin but still let `rustc` invoke the linker with the correct plugin arguments. This is useful when using LLD which does not need the `-plugin` argument. Since LLD is the best linker for this scenario anyway, this change should improve ergonomics quite a bit. r? @alexcrichton
2018-07-05Auto merge of #51732 - GuillaumeGomez:cmd-line-lint-rustdoc, r=QuietMisdreavusbors-17/+24
Add command line lint manipulation in rustdoc Fixes #50082. r? @QuietMisdreavus
2018-07-05#[cfg(target_has_atomic_cas)] -> #[cfg(target_has_atomic = "cas")]Jorge Aparicio-1/+1
2018-07-05enable Atomic*.{load,store} for ARMv6-M / MSP430Jorge Aparicio-0/+4
closes #45085 this commit adds an `atomic_cas` target option and an unstable `#[cfg(target_has_atomic_cas)]` attribute to enable a subset of the `Atomic*` API on architectures that don't support atomic CAS natively, like MSP430 and ARMv6-M.
2018-07-05Add command line lint manipulation in rustdocGuillaume Gomez-17/+24
2018-07-05Fix rustdoc run failures by shutting down definitely some lintsGuillaume Gomez-1/+5
2018-07-03Allow the linker to choose the LTO-plugin (which is useful when using LLD)Michael Woerister-1/+3
2018-06-20Raise an error if gcov profiling and incremental compilation are both enabledMarco Castelluccio-0/+7
2018-06-12Rename -Z no-verify to -Z verify-llvm-irNikita Popov-5/+5
This disables IR verification by default.
2018-06-11Fix extern prelude failure in rustdocGuillaume Gomez-0/+7
2018-06-04Remove the unused `-Z trans-time-graph` flag.kennytm-2/+0
Rebase of #50783 has accidentally revived the flag (which should be renamed to `-Z codegen-time-graph` by #50615).
2018-06-01Fix optimization_fuelJohn Kåre Alsaker-1/+2
2018-05-31Stabilize short error formatGuillaume Gomez-13/+1
2018-05-29rust-lang/rust#27282: emit `ReadForMatch` on each match arm.Felix S. Klock II-0/+4
Also, turn on ReadForMatch emission by default (when using NLL).
2018-05-29Debug flag to bypass restriction of mutation in match guards.Felix S. Klock II-0/+2
Now, if you pass `-Z disable-ast-check-for-mutation-in-guard`, then we will just allow you to mutably-borrow and assign in guards of `match` arms. This is wildly unsound with AST-borrowck. It is also unsound with MIR-borrowck without further adjustments, which come in later in the commit series on this Pull Request. See also rust-lang/rust#24535 and rust-lang/rfcs#1006.
2018-05-29expose -Zpolonius flagDouglas Campos-0/+2
2018-05-22Add -Z no-parallel-llvm flagNikita Popov-0/+2
Codegen issues commonly only manifest under specific circumstances, e.g. if multiple codegen units are used and ThinLTO is enabled. However, these configuration are threaded, making the use of LLVM debugging facilities hard, as output is interleaved. This patch adds a -Z no-parallel-llvm flag, which allows disabling parallelization of codegen and linking, while otherwise preserving behavior with regard to codegen units and LTO.
2018-05-21Stabilize suggestion applicability field in json outputManish Goregaokar-4/+0
2018-05-21Auto merge of #50265 - japaric:sz, r=alexcrichtonbors-21/+9
stabilize opt-level={s,z} closes #35784 closes #47651 ### Rationale Since the lastest LLVM upgrade rustc / LLVM does more agressive loop unrolling. This results in increased binary size of embedded / no_std programs: a hundreds of bytes increase, or about a 7x increase, in the case of the smallest Cortex-M binary cf. #49260. As we are shooting for embedded Rust on stable it would be great to also provide a way to optimize for size (which is pretty important for embedded applications that target resource constrained devices) on stable. Also this has been baking in nightly for a long time. r? @alexcrichton which team has to sign off this?
2018-05-17Emit noalias on &mut parameters by defaultNikita Popov-2/+2
This used to be disabled due to LLVM bugs in the handling of noalias information in conjunction with unwinding. However, according to #31681 all known LLVM bugs have been fixed by LLVM 6.0, so it's probably time to reenable this optimization. Noalias annotations will not be emitted by default if either -C panic=abort (as previously) or LLVM >= 6.0 (new). -Z mutable-noalias=no is left as an escape-hatch to allow debugging problems suspected to stem from this change.
2018-05-17Rename trans to codegen everywhere.Irina Popa-22/+22
2018-05-15Make mutable_noalias and arg_align_attributes be trackedAnthony Ramine-2/+2
2018-05-13Add a Rayon thread poolJohn Kåre Alsaker-1/+7
2018-05-09Allow for specifying a linker plugin for cross-language LTOMichael Woerister-4/+58
2018-05-07Auto merge of #50000 - michaelwoerister:cross-lang-lto, r=alexcrichtonbors-0/+2
Add some groundwork for cross-language LTO. Implements part of #49879: - Adds a `-Z cross-lang-lto` flag to rustc - Makes sure that bitcode is embedded in object files if the flag is set. This should already allow for using cross language LTO for staticlibs (where one has to invoke the linker manually anyway). However, `rustc` will not try to enable LTO for its own linker invocations yet. r? @alexcrichton
2018-05-05add `-Znll-facts` switch that dumps facts for new analysisNiko Matsakis-0/+2
2018-05-03Add -Z cross-lang-lto flag in order to support linker-based LTO.Michael Woerister-0/+2
2018-05-02make it compile againflip1995-1/+1
2018-05-01Rework force-frame-pointerSimonas Kazlauskas-5/+8
This reworks the force-frame-pointer PR to explicitly only consider the value of the flag if it is provided, and use a target default otherwise. Something that was tried but not kept was renaming the flag to `frame-pointer`, because for flag `frame-pointer=no`, there is no guarante, that LLVM will elide *all* the frame pointers; oposite of what the literal reading of the flag would suggest.
2018-05-01Don't force-enable frame pointers when generating debug infoBjörn Steinbrink-1/+7
We apparently used to generate bad/incomplete debug info causing debuggers not to find symbols of stack allocated variables. This was somehow worked around by having frame pointers. With the current codegen, this seems no longer necessary, so we can remove the code that force-enables frame pointers whenever debug info is requested. Since certain situations, like profiling code profit from having frame pointers, we add a -Cforce-frame-pointers flag to always enable frame pointers. Fixes #11906
2018-04-30Auto merge of #50204 - Manishearth:approx-enum, r=estebankbors-3/+3
Use enum for approximate suggestions r? @nrc @killercup
2018-04-27stabilize opt-level={s,z}Jorge Aparicio-21/+9
closes #35784
2018-04-26Rename rustc_back::target to rustc_target::spec.Irina Popa-9/+8
2018-04-26rustc_back: move LinkerFlavor, PanicStrategy, and RelroLevel to target.Irina Popa-6/+6
2018-04-25Approximate -> ApplicabilityManish Goregaokar-3/+3
2018-04-25Auto merge of #50134 - andjo403:jobserver, r=michaelwoeristerbors-4/+13
make rustdoc test follow the jobserver limit of threads fix that to many threads is executing at the same time when rustdoc test is executed.
2018-04-23add a `-Zchalk` command-line optionNiko Matsakis-0/+2