about summary refs log tree commit diff
path: root/src/librustc_interface/tests.rs
AgeCommit message (Collapse)AuthorLines
2020-05-06Rollup merge of #71269 - Mark-Simulacrum:sat-float-casts, r=nikicDylan DPC-1/+1
Define UB in float-to-int casts to saturate This closes #10184 by defining the behavior there to saturate infinities and values exceeding the integral range (on the lower or upper end). `NaN` is sent to zero.
2020-05-06Define UB in float-to-int casts to saturateMark Rousskov-1/+1
- Round to zero, and representable values cast directly. - `NaN` goes to 0 - Values beyond the limits of the type are saturated to the "nearest value" (essentially rounding to zero, in some sense) in the integral type, so e.g. `f32::INFINITY` would go to `{u,i}N::MAX.`
2020-05-04Add Option to Force Unwind TablesSam Elliott-0/+1
When panic != unwind, `nounwind` is added to all functions for a target. This can cause issues when a panic happens with RUST_BACKTRACE=1, as there needs to be a way to reconstruct the backtrace. There are three possible sources of this information: forcing frame pointers (for which an option exists already), debug info (for which an option exists), or unwind tables. Especially for embedded devices, forcing frame pointers can have code size overheads (RISC-V sees ~10% overheads, ARM sees ~2-3% overheads). In code, it can be the case that debug info is not kept, so it is useful to provide this third option, unwind tables, that users can use to reconstruct the call stack. Reconstructing this stack is harder than with frame pointers, but it is still possible. This commit adds a compiler option which allows a user to force the addition of unwind tables. Unwind tables cannot be disabled on targets that require them for correctness, or when using `-C panic=unwind`.
2020-05-01Rename `bitcode-in-rlib` option to `embed-bitcode`Alex Crichton-2/+1
This commit finishes work first pioneered in #70458 and started in #71528. The `-C bitcode-in-rlib` option, which has not yet reached stable, is renamed to `-C embed-bitcode` since that more accurately reflects what it does now anyway. Various tests and such are updated along the way as well. This'll also need to be backported to the beta channel to ensure we don't accidentally stabilize `-Cbitcode-in-rlib` as well.
2020-04-29Remove -Z no-landing-pads flagAmanieu d'Antras-1/+0
2020-04-26rustc_target: Stop using "string typing" for TLS modelsVadim Petrochenkov-2/+3
Introduce `enum TlsModel` instead.
2020-04-26rustc_target: Stop using "string typing" for relocation modelsVadim Petrochenkov-2/+2
Introduce `enum RelocModel` instead.
2020-04-22Use macros for option tests.Nicholas Nethercote-520/+177
2020-04-22Add all the missing option tests.Nicholas Nethercote-15/+273
2020-04-22Alphabetize the `-C` and `-Z` options.Nicholas Nethercote-77/+109
In the code, test, and docs, because it makes it much easier to find things. Other than adding the comments about alphabetical order, this commit only moves things around.
2020-04-22Add a new option `-Cbitcode-in-rlib`.Nicholas Nethercote-0/+4
It defaults to true, but Cargo will set this to false whenever it can to reduce compile times.
2020-04-19Replace uses of `parse_opt_*` with `parse_*` where possible.Nicholas Nethercote-3/+3
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-11Depend on getopts from crates.ioLuca Barbieri-2/+1
rustc_session exports it for other crates to avoid mismatching crate versions.
2020-04-04Do not lose or reorder user-provided linker argumentsVadim Petrochenkov-1/+1
2020-04-01Rollup merge of #70511 - ecstatic-morse:mir-dataflow-graphviz, r=davidtwcoMazdak Farrokhzad-0/+2
Add `-Z dump-mir-dataflow` flag for dumping dataflow results visualization Previously, to visualize the results of a MIR dataflow pass, one had to add a `#[rustc_mir(borrowck_graphviz_postflow)]` attribute to functions of interest. However, there is no way to specify this attribute on closures and generators, so it was impossible to view results for these MIR bodies. This PR adds a flag, `-Z dump-mir-dataflow`, which will output the dataflow results for any functions specified in `-Z dump-mir` to the output directory specified by `-Z dump-mir-dir`. This behavior is modeled on the `-Z dump-mir-graphviz` flag.
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-1/+1
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-1/+1
2020-03-28Add `-Z dump-mir-dataflow`Dylan MacKenzie-0/+2
2020-03-27Remove `no_integrated_as` mode.Nicholas Nethercote-4/+0
Specifically, remove both `-Z no_integrated_as` and `TargetOptions::no_integrated_as`. The latter was only used for the `msp430_none_elf` platform, for which it's no longer required.
2020-03-24Remove `-Z incremental`.Nicholas Nethercote-2/+0
`-C incremental` was introduced over two years ago. `-Z incremental` was kept for transitioning, but it's been long enough now that it should be ok to remove it.
2020-03-24Remove several dead `-Z` options.Nicholas Nethercote-2/+0
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-7/+7
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-6/+5
2020-01-11fix ui-fulldeps & tests falloutMazdak Farrokhzad-21/+21
2020-01-08Remove `-Z continue-parse-after-error`Vadim Petrochenkov-4/+0
2020-01-02Normalize `syntax::edition` imports.Mazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2019-12-22Format the worldMark Rousskov-92/+44
2019-12-09Add options to --extern flag.Eric Huss-11/+12
2019-12-01rustc_plugin: Remove support for adding plugins from command lineVadim Petrochenkov-4/+0
2019-11-20Delete ProcessCfgModMark Rousskov-2/+1
The previous commit removes the use of this, and now we cleanup.
2019-11-10move config.rs to libsyntax_expandMazdak Farrokhzad-35/+24
2019-10-19move parse_cfgspecs to rustc_interfaceMazdak Farrokhzad-0/+709