1
Fork 0

Use OutputFilenames to generate output file for -Zllvm-time-trace

The resulting profile will include the crate name and will be stored in
the `--out-dir` directory.

This implementation makes it convenient to use LLVM time trace together
with cargo, in the contrast to the previous implementation which would
overwrite profiles or store them in `.cargo/registry/..`.
This commit is contained in:
Tomasz Miąsko 2021-12-13 00:00:00 +00:00
parent 06a6674a7d
commit 3f2a1c9c17
7 changed files with 16 additions and 6 deletions

View file

@ -97,6 +97,7 @@ pub trait CodegenBackend {
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
outputs: &OutputFilenames,
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorReported>;
/// This is called on the returned `Box<dyn Any>` from `join_codegen`