Skip to content

Commit

Permalink
Rollup merge of #91868 - tmiasko:llvm-time-trace-out, r=oli-obk
Browse files Browse the repository at this point in the history
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/..`.
  • Loading branch information
matthiaskrgr authored Dec 15, 2021
2 parents edeb389 + a4bf9fb commit c57bcb8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
&self,
ongoing_codegen: Box<dyn Any>,
_sess: &Session,
_outputs: &OutputFilenames,
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorReported> {
Ok(*ongoing_codegen
.downcast::<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>)>()
Expand Down

0 comments on commit c57bcb8

Please sign in to comment.