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.
This commit is contained in:
Björn Steinbrink 2015-02-28 22:40:39 +01:00
parent 8a69110c3b
commit 0b5ca7850b

View File

@ -851,7 +851,9 @@ pub fn run_passes(sess: &Session,
// FIXME: time_llvm_passes support - does this use a global context or
// something?
//if sess.time_llvm_passes() { llvm::LLVMRustPrintPassTimings(); }
if sess.opts.cg.codegen_units == 1 && sess.time_llvm_passes() {
unsafe { llvm::LLVMRustPrintPassTimings(); }
}
}
struct WorkItem {