about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/driver/aot.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/driver/aot.rs b/src/driver/aot.rs
index 046e4393a68..2e047c7eea1 100644
--- a/src/driver/aot.rs
+++ b/src/driver/aot.rs
@@ -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));
     }