diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-01 09:50:30 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-01 09:50:30 +0530 |
| commit | 60f7732ccd9b0ad50490457ddd02a4a48cf74e74 (patch) | |
| tree | 12484cf1ddb630c10261b05ed2f763ae35974127 | |
| parent | 4e34daf2c44a03ceb297d3bbb50af99a05cb129e (diff) | |
| parent | 0b5ca7850bd62a2558a4efb7de0c12dfe1f4fb8e (diff) | |
| download | rust-60f7732ccd9b0ad50490457ddd02a4a48cf74e74.tar.gz rust-60f7732ccd9b0ad50490457ddd02a4a48cf74e74.zip | |
Rollup merge of #22910 - dotdash:time_llvm_passes, r=cmr
The timing code break when using multiple codegen units, but that shouldn't stop us from using it with a single codegen unit.
| -rw-r--r-- | src/librustc_trans/back/write.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs index a1fc63778ce..cd14fe529b1 100644 --- a/src/librustc_trans/back/write.rs +++ b/src/librustc_trans/back/write.rs @@ -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 { |
