@@ -164,8 +164,7 @@ fn run_aot(
164
164
module
165
165
} ;
166
166
167
- let emit_module = |name : & str ,
168
- kind : ModuleKind ,
167
+ let emit_module = |kind : ModuleKind ,
169
168
mut module : Module < FaerieBackend > ,
170
169
debug : Option < DebugContext > | {
171
170
module. finalize_definitions ( ) ;
@@ -177,11 +176,11 @@ fn run_aot(
177
176
178
177
let tmp_file = tcx
179
178
. output_filenames ( LOCAL_CRATE )
180
- . temp_path ( OutputType :: Object , Some ( name) ) ;
179
+ . temp_path ( OutputType :: Object , Some ( & artifact . name ) ) ;
181
180
let obj = artifact. emit ( ) . unwrap ( ) ;
182
181
std:: fs:: write ( & tmp_file, obj) . unwrap ( ) ;
183
182
CompiledModule {
184
- name : name . to_string ( ) ,
183
+ name : artifact . name ,
185
184
kind,
186
185
object : Some ( tmp_file) ,
187
186
bytecode : None ,
@@ -208,7 +207,7 @@ fn run_aot(
208
207
209
208
tcx. sess . abort_if_errors ( ) ;
210
209
211
- let mut allocator_module = new_module ( "allocator_shim.o " . to_string ( ) ) ;
210
+ let mut allocator_module = new_module ( "allocator_shim" . to_string ( ) ) ;
212
211
let created_alloc_shim = crate :: allocator:: codegen ( tcx. sess , & mut allocator_module) ;
213
212
214
213
rustc_incremental:: assert_dep_graph ( tcx) ;
@@ -251,14 +250,12 @@ fn run_aot(
251
250
Box :: new ( CodegenResults {
252
251
crate_name : tcx. crate_name ( LOCAL_CRATE ) ,
253
252
modules : vec ! [ emit_module(
254
- "dummy_name" ,
255
253
ModuleKind :: Regular ,
256
254
faerie_module,
257
255
debug,
258
256
) ] ,
259
257
allocator_module : if created_alloc_shim {
260
258
Some ( emit_module (
261
- "allocator_shim" ,
262
259
ModuleKind :: Allocator ,
263
260
allocator_module,
264
261
None ,
0 commit comments