Move LinkerInfo into CrateInfo
This commit is contained in:
parent
9a27044f42
commit
323a74779f
7 changed files with 12 additions and 16 deletions
|
@ -1,3 +1,4 @@
|
|||
use crate::back::linker::LinkerInfo;
|
||||
use crate::back::write::{
|
||||
compute_per_cgu_lto_type, start_async_codegen, submit_codegened_module_to_llvm,
|
||||
submit_post_lto_module_to_llvm, submit_pre_lto_module_to_llvm, ComputedLtoType, OngoingCodegen,
|
||||
|
@ -754,7 +755,8 @@ impl<B: ExtraBackendMethods> Drop for AbortCodegenOnDrop<B> {
|
|||
}
|
||||
|
||||
impl CrateInfo {
|
||||
pub fn new(tcx: TyCtxt<'_>) -> CrateInfo {
|
||||
pub fn new(tcx: TyCtxt<'_>, target_cpu: String) -> CrateInfo {
|
||||
let linker_info = LinkerInfo::new(tcx, target_cpu);
|
||||
let local_crate_name = tcx.crate_name(LOCAL_CRATE);
|
||||
let crate_attrs = tcx.hir().attrs(rustc_hir::CRATE_HIR_ID);
|
||||
let subsystem = tcx.sess.first_attr_value_str_by_name(crate_attrs, sym::windows_subsystem);
|
||||
|
@ -770,6 +772,7 @@ impl CrateInfo {
|
|||
});
|
||||
|
||||
let mut info = CrateInfo {
|
||||
linker_info,
|
||||
local_crate_name,
|
||||
panic_runtime: None,
|
||||
compiler_builtins: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue