Skip to content

Commit

Permalink
Make artifact_size usage closer to what cg_llvm does
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Dec 5, 2024
1 parent 65c5c7f commit 92b5873
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/driver/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,13 @@ fn emit_module(
Err(err) => return Err(format!("error writing object file: {}", err)),
};

prof.artifact_size("object_file", &*name, file.metadata().unwrap().len());
if prof.enabled() {
prof.artifact_size(
"object_file",
tmp_file.file_name().unwrap().to_string_lossy(),
file.metadata().unwrap().len(),
);
}

Ok(CompiledModule {
name,
Expand Down

0 comments on commit 92b5873

Please sign in to comment.