Skip to content

Commit 59785bd

Browse files
committed
Move invocation_temp out of CodegenCx
1 parent 0735ab5 commit 59785bd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/driver/aot.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ fn module_codegen(
593593
let producer = crate::debuginfo::producer(tcx.sess);
594594

595595
let profiler = tcx.prof.clone();
596+
let invocation_temp = tcx.sess.invocation_temp.clone();
596597

597598
OngoingModuleCodegen::Async(std::thread::spawn(move || {
598599
profiler.clone().generic_activity_with_arg("compile functions", &*cgu_name).run(|| {
@@ -618,15 +619,15 @@ fn module_codegen(
618619
&global_asm_config,
619620
&cgu_name,
620621
&cx.global_asm,
621-
cx.invocation_temp.as_deref(),
622+
invocation_temp.as_deref(),
622623
)
623624
})?;
624625

625626
let codegen_result =
626627
profiler.generic_activity_with_arg("write object file", &*cgu_name).run(|| {
627628
emit_cgu(
628629
&global_asm_config.output_filenames,
629-
cx.invocation_temp.as_deref(),
630+
invocation_temp.as_deref(),
630631
&profiler,
631632
cgu_name,
632633
module,

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ impl<F: Fn() -> String> Drop for PrintOnPanic<F> {
126126
/// inside a single codegen unit with the exception of the Cranelift [`Module`](cranelift_module::Module).
127127
struct CodegenCx {
128128
output_filenames: Arc<OutputFilenames>,
129-
invocation_temp: Option<String>,
130129
should_write_ir: bool,
131130
global_asm: String,
132131
debug_context: Option<DebugContext>,
@@ -144,7 +143,6 @@ impl CodegenCx {
144143
};
145144
CodegenCx {
146145
output_filenames: tcx.output_filenames(()).clone(),
147-
invocation_temp: tcx.sess.invocation_temp.clone(),
148146
should_write_ir: crate::pretty_clif::should_write_ir(tcx),
149147
global_asm: String::new(),
150148
debug_context,

0 commit comments

Comments
 (0)