Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 56bf873

Browse files
committed
Time object file writing
1 parent 0319b31 commit 56bf873

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/driver/aot.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,19 @@ fn module_codegen(
136136
}
137137
crate::main_shim::maybe_create_entry_wrapper(tcx, &mut module, &mut cx.unwind_context, false);
138138

139-
let codegen_result = emit_module(
140-
tcx,
141-
&backend_config,
142-
cgu.name().as_str().to_string(),
143-
ModuleKind::Regular,
144-
module,
145-
cx.debug_context,
146-
cx.unwind_context,
147-
);
139+
let debug_context = cx.debug_context;
140+
let unwind_context = cx.unwind_context;
141+
let codegen_result = tcx.sess.time("write object file", || {
142+
emit_module(
143+
tcx,
144+
&backend_config,
145+
cgu.name().as_str().to_string(),
146+
ModuleKind::Regular,
147+
module,
148+
debug_context,
149+
unwind_context,
150+
)
151+
});
148152

149153
codegen_global_asm(tcx, &cgu.name().as_str(), &cx.global_asm);
150154

0 commit comments

Comments
 (0)