Skip to content

Commit b267995

Browse files
committed
Cleanup
1 parent 554a1aa commit b267995

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/driver.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ fn run_aot(
164164
module
165165
};
166166

167-
let emit_module = |name: &str,
168-
kind: ModuleKind,
167+
let emit_module = |kind: ModuleKind,
169168
mut module: Module<FaerieBackend>,
170169
debug: Option<DebugContext>| {
171170
module.finalize_definitions();
@@ -177,11 +176,11 @@ fn run_aot(
177176

178177
let tmp_file = tcx
179178
.output_filenames(LOCAL_CRATE)
180-
.temp_path(OutputType::Object, Some(name));
179+
.temp_path(OutputType::Object, Some(&artifact.name));
181180
let obj = artifact.emit().unwrap();
182181
std::fs::write(&tmp_file, obj).unwrap();
183182
CompiledModule {
184-
name: name.to_string(),
183+
name: artifact.name,
185184
kind,
186185
object: Some(tmp_file),
187186
bytecode: None,
@@ -208,7 +207,7 @@ fn run_aot(
208207

209208
tcx.sess.abort_if_errors();
210209

211-
let mut allocator_module = new_module("allocator_shim.o".to_string());
210+
let mut allocator_module = new_module("allocator_shim".to_string());
212211
let created_alloc_shim = crate::allocator::codegen(tcx.sess, &mut allocator_module);
213212

214213
rustc_incremental::assert_dep_graph(tcx);
@@ -251,14 +250,12 @@ fn run_aot(
251250
Box::new(CodegenResults {
252251
crate_name: tcx.crate_name(LOCAL_CRATE),
253252
modules: vec![emit_module(
254-
"dummy_name",
255253
ModuleKind::Regular,
256254
faerie_module,
257255
debug,
258256
)],
259257
allocator_module: if created_alloc_shim {
260258
Some(emit_module(
261-
"allocator_shim",
262259
ModuleKind::Allocator,
263260
allocator_module,
264261
None,

0 commit comments

Comments
 (0)