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.
This commit is contained in:
@@ -204,7 +204,7 @@ fn fat_lto(
|
||||
let path = tmp_path.path().to_path_buf().join(&module.name);
|
||||
let path = path.to_str().expect("path");
|
||||
let context = &module.module_llvm.context;
|
||||
let config = cgcx.config(module.kind);
|
||||
let config = &cgcx.module_config;
|
||||
// NOTE: we need to set the optimization level here in order for LTO to do its job.
|
||||
context.set_optimization_level(to_gcc_opt_level(config.opt_level));
|
||||
context.add_command_line_option("-flto=auto");
|
||||
|
||||
Reference in New Issue
Block a user