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:
parent
69f45cd965
commit
f141acf067
4 changed files with 8 additions and 11 deletions
|
@ -13,7 +13,6 @@ use rustc_data_structures::fx::FxHashMap;
|
|||
use rustc_data_structures::profiling::SelfProfilerRef;
|
||||
use rustc_data_structures::profiling::TimingGuard;
|
||||
use rustc_data_structures::profiling::VerboseTimingGuard;
|
||||
use rustc_data_structures::svh::Svh;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_errors::emitter::Emitter;
|
||||
use rustc_errors::{DiagnosticId, FatalError, Handler, Level};
|
||||
|
@ -414,7 +413,6 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
|
|||
let sess = tcx.sess;
|
||||
|
||||
let crate_name = tcx.crate_name(LOCAL_CRATE);
|
||||
let crate_hash = tcx.crate_hash(LOCAL_CRATE);
|
||||
let no_builtins = tcx.sess.contains_name(&tcx.hir().krate().item.attrs, sym::no_builtins);
|
||||
let is_compiler_builtins =
|
||||
tcx.sess.contains_name(&tcx.hir().krate().item.attrs, sym::compiler_builtins);
|
||||
|
@ -463,7 +461,6 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
|
|||
OngoingCodegen {
|
||||
backend,
|
||||
crate_name,
|
||||
crate_hash,
|
||||
metadata,
|
||||
windows_subsystem,
|
||||
linker_info,
|
||||
|
@ -1720,7 +1717,6 @@ impl SharedEmitterMain {
|
|||
pub struct OngoingCodegen<B: ExtraBackendMethods> {
|
||||
pub backend: B,
|
||||
pub crate_name: Symbol,
|
||||
pub crate_hash: Svh,
|
||||
pub metadata: EncodedMetadata,
|
||||
pub windows_subsystem: Option<String>,
|
||||
pub linker_info: LinkerInfo,
|
||||
|
@ -1766,7 +1762,6 @@ impl<B: ExtraBackendMethods> OngoingCodegen<B> {
|
|||
(
|
||||
CodegenResults {
|
||||
crate_name: self.crate_name,
|
||||
crate_hash: self.crate_hash,
|
||||
metadata: self.metadata,
|
||||
windows_subsystem: self.windows_subsystem,
|
||||
linker_info: self.linker_info,
|
||||
|
|
|
@ -21,7 +21,6 @@ extern crate tracing;
|
|||
extern crate rustc_middle;
|
||||
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::svh::Svh;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_hir::def_id::CrateNum;
|
||||
use rustc_hir::LangItem;
|
||||
|
@ -134,7 +133,6 @@ pub struct CodegenResults {
|
|||
pub modules: Vec<CompiledModule>,
|
||||
pub allocator_module: Option<CompiledModule>,
|
||||
pub metadata_module: Option<CompiledModule>,
|
||||
pub crate_hash: Svh,
|
||||
pub metadata: rustc_middle::middle::cstore::EncodedMetadata,
|
||||
pub windows_subsystem: Option<String>,
|
||||
pub linker_info: back::linker::LinkerInfo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue