about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
AgeCommit message (Collapse)AuthorLines
2020-10-22Capture output from threads spawned in testsTyler Mandry-0/+5
Fixes #42474.
2020-10-21Strip tokens before printing AST JSONAaron Hill-2/+70
2020-10-14Rollup merge of #77795 - bjorn3:codegen_backend_interface_refactor, r=oli-obkDylan DPC-4/+34
Codegen backend interface refactor This moves several things away from the codegen backend to rustc_interface. There are a few behavioral changes where previously the incremental cache (incorrectly) wouldn't get finalized, but now it does. See the individual commit messages.
2020-10-13Auto merge of #76830 - Artoria2e5:tune, r=nagisabors-0/+1
Pass tune-cpu to LLVM I think this is how it should work... See https://internals.rust-lang.org/t/expose-tune-cpu-from-llvm/13088 for the background. Or the documentation diff.
2020-10-11Auto merge of #77565 - khyperia:codegen-backend-dep, r=ecstatic-morsebors-0/+4
Add -Z codegen-backend dylib to deps When the codegen-backend dylib changes, the program should be rebuilt. --- Unfortunately I was unable to test this works locally due to running into a TLS issue when running the custom backend, `thread 'rustc' panicked at 'no ImplicitCtxt stored in tls', compiler/rustc_middle/src/ty/context.rs:1750:54`, which seems similar to https://github.com/rust-lang/rust/issues/62717 but has a completely different cause and backtrace. `@eddyb` said to ping `@Mark-Simulacrum` about what they think about this, so, ping!
2020-10-10Use fixed type for CodegenResultsbjorn3-1/+15
This also moves the -Zno-link implementation to rustc_interface
2020-10-10Move finalize_session_directory call out of cg_llvmbjorn3-0/+8
This causes it to be called even when passing `-Zno-link`, when linking fails or when neither `--emit link` nor `--emit metadata` is used.
2020-10-10Move save_work_product_index call out of cg_llvmbjorn3-3/+11
2020-10-08Remove not needed lambda.Kazantcev Andrey-1/+1
2020-10-05Add -Z codegen-backend dylib to depskhyperia-0/+4
When the codegen-backend dylib changes, the program should be rebuilt.
2020-10-05Pass tune-cpu to LLVMMingye Wang-0/+1
I think this is how it should work...
2020-10-01Add `-Zprecise-enum-drop-elaboration`Dylan MacKenzie-0/+1
Its purpose is to assist in debugging #77382 and #74551.
2020-09-27Add option to pass a custom codegen backend from a driverbjorn3-1/+14
2020-09-17PR feedbackkhyperia-3/+3
2020-09-17Let backends define custom targetskhyperia-6/+10
Add a target_override hook that takes priority over builtin targets.
2020-09-10Attach tokens to `ast::Stmt`Aaron Hill-0/+2
We currently only attach tokens when parsing a `:stmt` matcher for a `macro_rules!` macro. Proc-macro attributes on statements are still unstable, and need additional work.
2020-09-10Attach `TokenStream` to `ast::Block`Aaron Hill-0/+1
A `Block` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-03Auto merge of #73996 - da-x:short-unique-paths, r=petrochenkovbors-0/+1
diagnostics: shorten paths of unique symbols This is a step towards implementing a fix for #50310, and continuation of the discussion in [Pre-RFC: Nicer Types In Diagnostics - compiler - Rust Internals](https://internals.rust-lang.org/t/pre-rfc-nicer-types-in-diagnostics/11139). Impressed upon me from previous discussion in #21934 that an RFC for this is not needed, and I should just come up with code. The recent improvements to `use` suggestions that I've contributed have given rise to this implementation. Contrary to previous suggestions, it's rather simple logic, and I believe it only reduces the amount of cognitive load that a developer would need when reading type errors. ----- If a symbol name can only be imported from one place, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path to the last component. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable from anywhere.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-0/+1
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-09-02Auto merge of #76216 - marmeladema:use-once-cell-from-std, r=matkladbors-5/+5
compiler: use `OnceCell` from std Fixes #76192 The only remaining direct use of `lazy_static` crate is in `src/bootstrap` but I am not sure how I can remove that dependency for now. r? @matklad
2020-09-01Rollup merge of #76158 - mati865:self-contained-option, r=petrochenkovTyler Mandry-0/+1
Stabilise link-self-contained option MCP has been accepted: https://github.com/rust-lang/compiler-team/issues/343 I'll add improved heuristic in next PR.
2020-09-01interface: use `OnceCell` from standard librarymarmeladema-5/+5
2020-08-31Rollup merge of #76075 - marmeladema:remove-once-cell-crate, r=matkladAleksey Kladov-0/+1
datastructures: replace `once_cell` crate with an impl from std Fixes #75700 r? @matklad We might need a perf run for this change.
2020-08-31Stabilise link-self-contained optionMateusz MikuĊ‚a-0/+1
2020-08-30Add `-Z proc-macro-backtrace` to allow showing proc-macro panicsAaron Hill-0/+2
Fixes #75050 Previously, we would unconditionally suppress the panic hook during proc-macro execution. This commit adds a new flag -Z proc-macro-backtrace, which allows running the panic hook for easier debugging.
2020-08-30datastructures: replace `once_cell` crate with an impl from stdmarmeladema-0/+1
2020-08-30mv compiler to compiler/mark-0/+3101