Skip to content

Commit 0b5ca78

Browse files
committed
Re-enable -Z time-llvm-passes when using a single codegen unit
The timing code break when using multiple codegen units, but that shouldn't stop us from using it with a single codegen unit.
1 parent 8a69110 commit 0b5ca78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_trans/back/write.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,9 @@ pub fn run_passes(sess: &Session,
851851

852852
// FIXME: time_llvm_passes support - does this use a global context or
853853
// something?
854-
//if sess.time_llvm_passes() { llvm::LLVMRustPrintPassTimings(); }
854+
if sess.opts.cg.codegen_units == 1 && sess.time_llvm_passes() {
855+
unsafe { llvm::LLVMRustPrintPassTimings(); }
856+
}
855857
}
856858

857859
struct WorkItem {

0 commit comments

Comments
 (0)