Second attempt at fixing LTO tests
FIXME: we now have fat LTO objects even when only bitcode is requested.
This commit is contained in:
parent
bc8520d98e
commit
fe054be06e
5 changed files with 4 additions and 15 deletions
|
|
@ -489,7 +489,6 @@ fn thin_lto(
|
|||
//let path = module_buffer.0.to_str().expect("path");
|
||||
//let my_path = PathBuf::from(path);
|
||||
//let exists = my_path.exists();
|
||||
//println!("Path: {:?}: {}", path, exists);
|
||||
/*module.module_llvm.should_combine_object_files = true;
|
||||
module
|
||||
.module_llvm
|
||||
|
|
@ -626,11 +625,6 @@ pub unsafe fn optimize_thin_module(
|
|||
match *module {
|
||||
SerializedModule::Local(ref module_buffer) => {
|
||||
let path = module_buffer.0.to_str().expect("path");
|
||||
|
||||
//let my_path = PathBuf::from(path);
|
||||
//let exists = my_path.exists();
|
||||
//println!("Path2: {:?}: {}", path, exists);
|
||||
|
||||
context.add_driver_option(path);
|
||||
should_combine_object_files = true;
|
||||
/*module.module_llvm.should_combine_object_files = true;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ pub(crate) unsafe fn codegen(
|
|||
.generic_activity_with_arg("GCC_module_codegen_emit_bitcode", &*module.name);
|
||||
context.add_command_line_option("-flto=auto");
|
||||
context.add_command_line_option("-flto-partition=one");
|
||||
// TODO: remove since we don't want fat objects when it is for Bitcode only.
|
||||
context.add_command_line_option("-ffat-lto-objects");
|
||||
context
|
||||
.compile_to_file(OutputKind::ObjectFile, bc_out.to_str().expect("path to str"));
|
||||
}
|
||||
|
|
@ -135,7 +137,6 @@ pub(crate) unsafe fn codegen(
|
|||
obj_out.to_str().expect("path to str"),
|
||||
);
|
||||
} else {
|
||||
//println!("Combining to object file");
|
||||
context.compile_to_file(
|
||||
OutputKind::ObjectFile,
|
||||
obj_out.to_str().expect("path to str"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue