rust/compiler/rustc_codegen_ssa/src/back
bors 1689a5a531 Auto merge of #122597 - pacak:master, r=bjorn3
Show files produced by `--emit foo` in json artifact notifications

Right now it is possible to ask `rustc` to save some intermediate representation into one or more files with `--emit=foo`, but figuring out what exactly was produced is difficult. This pull request adds information about `llvm_ir` and `asm` intermediate files into notifications produced by `--json=artifacts`.

Related discussion: https://internals.rust-lang.org/t/easier-access-to-files-generated-by-emit-foo/20477

Motivation - `cargo-show-asm` parses those intermediate files and presents them in a user friendly way, but right now I have to apply some dirty hacks. Hacks make behavior confusing: https://github.com/hintron/computer-enhance/issues/35

This pull request introduces a new behavior: now `rustc` will emit a new artifact notification for every artifact type user asked to `--emit`, for example for `--emit asm` those will include all the `.s` files.

Most users won't notice this behavior, to be affected by it all of the following must hold:
- user must use `rustc` binary directly (when `cargo` invokes `rustc` - it consumes artifact notifications and doesn't emit anything)
- user must specify both `--emit xxx` and `--json artifacts`
- user must refuse to handle unknown artifact types
- user must disable incremental compilation (or deal with it better than cargo does, or use a workaround like `save-temps`) in order not to hit #88829 / #89149
2024-06-04 00:05:56 +00:00
..
rpath Handle non-utf8 rpaths (fix FIXME) 2023-08-03 20:04:18 +02:00
archive.rs Use the default file permissions when writing 2024-04-17 12:51:20 +00:00
command.rs Update comment and remove special-case for Wasm targets which is incompatible with response-file changes 2024-03-20 23:38:15 +00:00
link.rs Auto merge of #125463 - GuillaumeGomez:rollup-287wx4y, r=GuillaumeGomez 2024-05-24 03:04:06 +00:00
linker.rs Remove #[macro_use] extern crate tracing from rustc_codegen_ssa. 2024-05-23 18:02:40 +10:00
lto.rs Merge new_metadata into codegen_allocator 2022-04-30 21:20:08 +02:00
metadata.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
mod.rs Use the object crate for metadata reading 2021-05-07 18:48:58 +02:00
rpath.rs Remove #[macro_use] extern crate tracing from rustc_codegen_ssa. 2024-05-23 18:02:40 +10:00
symbol_export.rs Auto merge of #125434 - nnethercote:rm-more-extern-tracing, r=jackh726 2024-05-23 21:36:54 +00:00
write.rs Auto merge of #122597 - pacak:master, r=bjorn3 2024-06-04 00:05:56 +00:00