mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
async-llvm(20): Do some cleanup.
This commit is contained in:
parent
81b789fd87
commit
ab3bc584c0
@ -341,7 +341,7 @@ pub struct CodegenContext {
|
|||||||
// compiling incrementally
|
// compiling incrementally
|
||||||
pub incr_comp_session_dir: Option<PathBuf>,
|
pub incr_comp_session_dir: Option<PathBuf>,
|
||||||
// Channel back to the main control thread to send messages to
|
// Channel back to the main control thread to send messages to
|
||||||
pub coordinator_send: Sender<Message>,
|
coordinator_send: Sender<Message>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CodegenContext {
|
impl CodegenContext {
|
||||||
@ -660,17 +660,17 @@ fn need_crate_bitcode_for_rlib(sess: &Session) -> bool {
|
|||||||
sess.opts.output_types.contains_key(&OutputType::Exe)
|
sess.opts.output_types.contains_key(&OutputType::Exe)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_passes(sess: &Session,
|
pub fn start_async_translation(sess: &Session,
|
||||||
crate_output: &OutputFilenames,
|
crate_output: &OutputFilenames,
|
||||||
crate_name: Symbol,
|
crate_name: Symbol,
|
||||||
link: LinkMeta,
|
link: LinkMeta,
|
||||||
metadata: EncodedMetadata,
|
metadata: EncodedMetadata,
|
||||||
exported_symbols: Arc<ExportedSymbols>,
|
exported_symbols: Arc<ExportedSymbols>,
|
||||||
no_builtins: bool,
|
no_builtins: bool,
|
||||||
windows_subsystem: Option<String>,
|
windows_subsystem: Option<String>,
|
||||||
linker_info: LinkerInfo,
|
linker_info: LinkerInfo,
|
||||||
no_integrated_as: bool)
|
no_integrated_as: bool)
|
||||||
-> OngoingCrateTranslation {
|
-> OngoingCrateTranslation {
|
||||||
let output_types_override = if no_integrated_as {
|
let output_types_override = if no_integrated_as {
|
||||||
OutputTypes::new(&[(OutputType::Assembly, None)])
|
OutputTypes::new(&[(OutputType::Assembly, None)])
|
||||||
} else {
|
} else {
|
||||||
@ -1061,7 +1061,7 @@ fn execute_work_item(cgcx: &CodegenContext, work_item: WorkItem)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Message {
|
enum Message {
|
||||||
Token(io::Result<Acquired>),
|
Token(io::Result<Acquired>),
|
||||||
Done { result: Result<CompiledModule, ()> },
|
Done { result: Result<CompiledModule, ()> },
|
||||||
WorkItem(WorkItem),
|
WorkItem(WorkItem),
|
||||||
@ -1069,8 +1069,7 @@ pub enum Message {
|
|||||||
TranslationDone,
|
TranslationDone,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct Diagnostic {
|
||||||
pub struct Diagnostic {
|
|
||||||
msg: String,
|
msg: String,
|
||||||
code: Option<String>,
|
code: Option<String>,
|
||||||
lvl: Level,
|
lvl: Level,
|
||||||
@ -1519,14 +1518,14 @@ impl SharedEmitterMain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct OngoingCrateTranslation {
|
pub struct OngoingCrateTranslation {
|
||||||
pub crate_name: Symbol,
|
crate_name: Symbol,
|
||||||
pub link: LinkMeta,
|
link: LinkMeta,
|
||||||
pub metadata: EncodedMetadata,
|
metadata: EncodedMetadata,
|
||||||
pub exported_symbols: Arc<ExportedSymbols>,
|
exported_symbols: Arc<ExportedSymbols>,
|
||||||
pub no_builtins: bool,
|
no_builtins: bool,
|
||||||
pub windows_subsystem: Option<String>,
|
windows_subsystem: Option<String>,
|
||||||
pub linker_info: LinkerInfo,
|
linker_info: LinkerInfo,
|
||||||
pub no_integrated_as: bool,
|
no_integrated_as: bool,
|
||||||
|
|
||||||
output_filenames: OutputFilenames,
|
output_filenames: OutputFilenames,
|
||||||
regular_module_config: ModuleConfig,
|
regular_module_config: ModuleConfig,
|
||||||
|
@ -962,7 +962,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||||||
!tcx.sess.opts.output_types.should_trans() {
|
!tcx.sess.opts.output_types.should_trans() {
|
||||||
let empty_exported_symbols = ExportedSymbols::empty();
|
let empty_exported_symbols = ExportedSymbols::empty();
|
||||||
let linker_info = LinkerInfo::new(&shared_ccx, &empty_exported_symbols);
|
let linker_info = LinkerInfo::new(&shared_ccx, &empty_exported_symbols);
|
||||||
let ongoing_translation = write::run_passes(
|
let ongoing_translation = write::start_async_translation(
|
||||||
tcx.sess,
|
tcx.sess,
|
||||||
output_filenames,
|
output_filenames,
|
||||||
tcx.crate_name(LOCAL_CRATE),
|
tcx.crate_name(LOCAL_CRATE),
|
||||||
@ -1012,7 +1012,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|||||||
(output_filenames.outputs.contains_key(&OutputType::Object) ||
|
(output_filenames.outputs.contains_key(&OutputType::Object) ||
|
||||||
output_filenames.outputs.contains_key(&OutputType::Exe)));
|
output_filenames.outputs.contains_key(&OutputType::Exe)));
|
||||||
|
|
||||||
let ongoing_translation = write::run_passes(
|
let ongoing_translation = write::start_async_translation(
|
||||||
tcx.sess,
|
tcx.sess,
|
||||||
output_filenames,
|
output_filenames,
|
||||||
tcx.crate_name(LOCAL_CRATE),
|
tcx.crate_name(LOCAL_CRATE),
|
||||||
|
Loading…
Reference in New Issue
Block a user