mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 09:53:04 +03:00
Record object file artifact size in self profile data
This commit is contained in:
@@ -56,6 +56,9 @@ fn emit_module(
|
||||
|
||||
let tmp_file = tcx.output_filenames(()).temp_path(OutputType::Object, Some(&name));
|
||||
let obj = product.object.write().unwrap();
|
||||
|
||||
tcx.sess.prof.artifact_size("object_file", name.clone(), obj.len().try_into().unwrap());
|
||||
|
||||
if let Err(err) = std::fs::write(&tmp_file, obj) {
|
||||
tcx.sess.fatal(&format!("error writing object file: {}", err));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user