Skip to content

Commit c1477c3

Browse files
committed
Special case allocator module submission to avoid special casing it elsewhere
A lot of places had special handling just in case they would get an allocator module even though most of these places could never get one or would have a trivial implementation for the allocator module. Moving all handling of the allocator module to a single place simplifies things a fair bit.
1 parent 26736f9 commit c1477c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/back/lto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ fn fat_lto(
204204
let path = tmp_path.path().to_path_buf().join(&module.name);
205205
let path = path.to_str().expect("path");
206206
let context = &module.module_llvm.context;
207-
let config = cgcx.config(module.kind);
207+
let config = &cgcx.module_config;
208208
// NOTE: we need to set the optimization level here in order for LTO to do its job.
209209
context.set_optimization_level(to_gcc_opt_level(config.opt_level));
210210
context.add_command_line_option("-flto=auto");

0 commit comments

Comments
 (0)