Access to compiler artifact notifications messages #13672
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
Problem
You can pass
--json=artifacts
torustc
and it will emit json messages like{"$message_type":"artifact","artifact":"/path/to/target/release/deps/libsample-fb5d74408737397e.rlib","emit":"link"}
tostderr
.cargo
then parses them and mostly ignores:cargo/src/cargo/core/compiler/mod.rs
Lines 1803 to 1810 in a59aba1
later emitting its own version:
cargo/src/cargo/core/compiler/mod.rs
Line 563 in a59aba1
I'm extending
--json=artifacts
inrustc
to include files produced by--emit
(rust-lang/rust#122597) to avoid doing fragile guesswork incargo-show-asm
, but right now this information won't be accessible whenrustc
is invoked viacargo
.Proposed Solution
cargo
should collect this information when present and output it as part of its own notifications, including cases whererustc
wasn't actually invoked if source files staid the same.Notes
The alternative is for me to invoke
rustc
directly - fragile or to do nothing - currently I have to passcodegen-units=1
- potentially confusing behavior.If approved - I can look into implementing required change myself.
The text was updated successfully, but these errors were encountered: