Generalize BaseTypeCodegenMethods

This commit is contained in:
Oli Scherer
2025-02-24 11:31:43 +00:00
committed by Oli Scherer
parent 75356b7437
commit 840e31b29f
6 changed files with 35 additions and 29 deletions

View File

@@ -6,6 +6,7 @@ use std::sync::Arc;
use std::sync::mpsc::{Receiver, Sender, channel};
use std::{fs, io, mem, str, thread};
use rustc_abi::Size;
use rustc_ast::attr;
use rustc_ast::expand::autodiff_attrs::AutoDiffItem;
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
@@ -351,6 +352,7 @@ pub struct CodegenContext<B: WriteBackendMethods> {
pub target_is_like_aix: bool,
pub split_debuginfo: rustc_target::spec::SplitDebuginfo,
pub split_dwarf_kind: rustc_session::config::SplitDwarfKind,
pub pointer_size: Size,
/// All commandline args used to invoke the compiler, with @file args fully expanded.
/// This will only be used within debug info, e.g. in the pdb file on windows
@@ -1212,6 +1214,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
split_debuginfo: tcx.sess.split_debuginfo(),
split_dwarf_kind: tcx.sess.opts.unstable_opts.split_dwarf_kind,
parallel: backend.supports_parallel() && !sess.opts.unstable_opts.no_parallel_backend,
pointer_size: tcx.data_layout.pointer_size,
};
// This is the "main loop" of parallel work happening for parallel codegen.