Skip to content

Commit 92b5873

Browse files
committed
Make artifact_size usage closer to what cg_llvm does
1 parent 65c5c7f commit 92b5873

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/driver/aot.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,13 @@ fn emit_module(
411411
Err(err) => return Err(format!("error writing object file: {}", err)),
412412
};
413413

414-
prof.artifact_size("object_file", &*name, file.metadata().unwrap().len());
414+
if prof.enabled() {
415+
prof.artifact_size(
416+
"object_file",
417+
tmp_file.file_name().unwrap().to_string_lossy(),
418+
file.metadata().unwrap().len(),
419+
);
420+
}
415421

416422
Ok(CompiledModule {
417423
name,

0 commit comments

Comments
 (0)