Move finalize_session_directory call out of cg_llvm

This causes it to be called even when passing `-Zno-link`, when linking
fails or when neither `--emit link` nor `--emit metadata` is used.
This commit is contained in:
bjorn3 2020-10-10 15:20:35 +02:00
parent 69f45cd965
commit f141acf067
4 changed files with 8 additions and 11 deletions

View file

@ -325,10 +325,6 @@ impl CodegenBackend for LlvmCodegenBackend {
);
});
// Now that we won't touch anything in the incremental compilation directory
// any more, we can finalize it (which involves renaming it)
rustc_incremental::finalize_session_directory(sess, codegen_results.crate_hash);
sess.time("llvm_dump_timing_file", || {
if sess.opts.debugging_opts.llvm_time_trace {
llvm_util::time_trace_profiler_finish("llvm_timings.json");