about summary refs log tree commit diff
path: root/src/librustc_interface
AgeCommit message (Collapse)AuthorLines
2020-04-27Change return type of `entry_fn` query to return a `LocalDefId`marmeladema-1/+1
2020-04-27Accept `LocalDefId` as key for `mir_borrowck` querymarmeladema-1/+1
2020-04-27Rollup merge of #71558 - petrochenkov:tlsm, r=AmanieuDylan DPC-2/+3
Cleanup and document `-Z tls-model` r? @Amanieu
2020-04-26rustc_target: Stop using "string typing" for TLS modelsVadim Petrochenkov-2/+3
Introduce `enum TlsModel` instead.
2020-04-26Rollup merge of #71537 - Mark-Simulacrum:no-self-open, r=davidtwcoDylan DPC-1/+1
Remove support for self-opening This was only used for linkage test cases, which is already covered by the [run-make-fulldeps/symbol-visibility test](https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/symbol-visibility/Makefile) -- which fairly extensively makes sure we're correctly exporting the right symbols at the right visibility (for various Rust crate types). This fixes #10379 and resolves #10356 by removing the test case (and underlying support in the compiler). AFAICT, the better way to test visibility is via nm, like the symbol visibility test. It seems like that's sufficient; I suspect that given that we don't use this we should just drop it (android is tier 2 anyway). But happy to hear otherwise.
2020-04-26Rollup merge of #71562 - matthiaskrgr:cl7ppy, r=Dylan-DPCDylan DPC-4/+4
fix more clippy warnings clippy::{redundant_pattern_matching, clone_on_copy, iter_cloned_collect, option_as_ref_deref, match_ref_pats} r? @Dylan-DPC
2020-04-26rustc_target: Stop using "string typing" for relocation modelsVadim Petrochenkov-2/+2
Introduce `enum RelocModel` instead.
2020-04-26fix more clippy warningsMatthias Krüger-4/+4
clippy::{redundant_pattern_matching, clone_on_copy, iter_cloned_collect, option_as_ref_deref, match_ref_pats}
2020-04-26Rollup merge of #71554 - gizmondo:68922, r=jonas-schievinkDylan DPC-3/+4
Replace thread_local with generator resume arguments in box_region. Fixes #68922. Continuation of #70622. Added a short doc, hope it makes sense. r? @jonas-schievink
2020-04-25Replace thread_local with generator resume arguments in box_region.Alex Aktsipetrov-3/+4
2020-04-25Remove support for self-openingMark Rousskov-1/+1
This was only used for linkage test cases, which is already covered by the run-make-fulldeps/symbol-visibility test -- which fairly extensively makes sure we're correctly exporting the right symbols at the right visibility (for various Rust crate types).
2020-04-24Replace filter_map().next() calls with find_map()Josh Stone-11/+8
These are semantically the same, but `find_map()` is more concise.
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-1/+1
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-22Auto merge of #71323 - nnethercote:bitcode-in-rlib, r=alexcrichtonbors-0/+4
Add `-Cbitcode-in-rlib`. This is a cut-down version of #70458 that gets the compile-time wins. r? @alexcrichton
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-22Rollup merge of #71236 - sinkuu:cleanup, r=nikomatsakisYuki Okushi-1/+0
Remove unused rustc_serialize::hex module * Remove unused `rustc_serialize::hex` module * Cleanup `Cargo.toml`
2020-04-20Remove unused dependenciesShotaro Yamada-1/+0
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-11Depend on libc from crates.ioLuca Barbieri-3/+1
2020-04-10librustc_middle: return LocalDefId instead of DefId in body_owner_def_idmarmeladema-3/+3
2020-04-06Rollup merge of #70665 - petrochenkov:linkargs, r=nagisaMazdak Farrokhzad-1/+1
Do not lose or reorder user-provided linker arguments Linker arguments are potentially order-dependent, so the order in which `-C link-arg` and `-C link-args` options are passed to `rustc` should be preserved when they are passed further to the linker. Also, multiple `-C link-args` options are now appended to each other rather than overwrite each other. In other words, `-C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f` is now passed as `"a" "b" "c" "d" "e" "f"` and not as `"d" "e" "a" "f"`. Addresses https://github.com/rust-lang/rust/pull/70505#issuecomment-606780163.
2020-04-05Query-ify Instance::resolveAaron Hill-1/+0
2020-04-04Do not lose or reorder user-provided linker argumentsVadim Petrochenkov-1/+1
2020-04-02Add hash of source files in debug infoArlo Siemsen-5/+3
* 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-02use direct import for ErrorReportedMazdak Farrokhzad-4/+3
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-31more clippy fixesMatthias Krüger-1/+1
use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-11/+11
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-21/+21
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-5/+5
2020-03-28Add `-Z dump-mir-dataflow`Dylan MacKenzie-0/+2
2020-03-28Auto merge of #70261 - Centril:angle-args-partition, r=varkorbors-7/+9
Move arg/constraint partition check to validation & improve recovery - In the first commit, we move the check rejecting e.g., `<'a, Item = u8, String>` from the parser into AST validation. - We then use this to improve the code for parsing generic arguments. - And we add recovery for e.g., `<Item = >` (missing), `<Item = 42>` (constant), and `<Item = 'a>` (lifetime). This is also preparatory work for supporting https://github.com/rust-lang/rust/issues/70256. r? @varkor
2020-03-27parse: move constraint/arg restriction to ast_validation.Mazdak Farrokhzad-7/+9
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-25Auto merge of #70297 - nnethercote:clean-up-debugging-options, ↵bors-4/+0
r=michaelwoerister Clean up debugging options I found various sub-optimal things when I was looking at option handling.
2020-03-25Rollup merge of #70373 - Centril:canon-imports, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
normalize some imports & prefer direct ones r? @Mark-Simulacrum
2020-03-24normalize some imports, prefer direct ones.Mazdak Farrokhzad-1/+1
2020-03-24{rustc::hir::map -> rustc_passes}::hir_id_validatorMazdak Farrokhzad-1/+1
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-23Auto merge of #70296 - Centril:rollup-wvfmb3n, r=Centrilbors-1/+1
Rollup of 9 pull requests Successful merges: - #69251 (#[track_caller] in traits) - #69880 (miri engine: turn error sanity checks into assertions) - #70207 (Use getentropy(2) on macos) - #70227 (Only display definition when suggesting a typo) - #70236 (resolve: Avoid "self-confirming" import resolutions in one more case) - #70248 (parser: simplify & remove unused field) - #70249 (handle ConstKind::Unresolved after monomorphizing) - #70269 (remove redundant closures (clippy::redundant_closure)) - #70270 (Clean up E0449 explanation) Failed merges: r? @ghost
2020-03-22remove redundant closures (clippy::redundant_closure)Matthias Krüger-1/+1
2020-03-21dep_graph.assert_ignored() -> rustc_interfaceMazdak Farrokhzad-1/+5
2020-03-21separate out an arena for HIRMazdak Farrokhzad-3/+5
2020-03-21Rollup merge of #69497 - Zoxc:ast-fragment-error, r=petrochenkovDylan DPC-2/+11
Don't unwind when hitting the macro expansion recursion limit This removes one use of `FatalError.raise()`. r? @petrochenkov
2020-03-19Refactorings to begin getting rid of rustc_codegen_utilsMark Mansi-25/+65