Make artifact_size usage closer to what cg_llvm does
This commit is contained in:
parent
65c5c7f8cf
commit
92b5873072
1 changed files with 7 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue