1
Fork 0

Make artifact_size usage closer to what cg_llvm does

This commit is contained in:
bjorn3 2024-12-05 12:09:07 +00:00
parent 65c5c7f8cf
commit 92b5873072

View file

@ -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,