File tree 5 files changed +4
-15
lines changed
5 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -121,8 +121,7 @@ If you compiled cg_gccjit in debug mode (aka you didn't pass `--release` to `./y
121
121
122
122
### LTO
123
123
124
- To use LTO, you need to set the variable ` FAT_LTO=1 ` and ` EMBED_LTO_BITCODE=1 ` in addition to setting ` lto = "fat" ` in the ` Cargo.toml ` .
125
- Don't set ` FAT_LTO ` when compiling the sysroot, though: only set ` EMBED_LTO_BITCODE=1 ` .
124
+ To use LTO, you need to set the variable ` EMBED_LTO_BITCODE=1 ` in addition to setting ` lto = "fat" ` in the ` Cargo.toml ` .
126
125
127
126
Failing to set ` EMBED_LTO_BITCODE ` will give you the following error:
128
127
Original file line number Diff line number Diff line change @@ -387,12 +387,6 @@ impl ConfigInfo {
387
387
rustflags. push ( "-Csymbol-mangling-version=v0" . to_string ( ) ) ;
388
388
}
389
389
390
- // Since we don't support ThinLTO, disable LTO completely when not trying to do LTO.
391
- // TODO(antoyo): remove when we can handle ThinLTO.
392
- // TODO: remove:
393
- /*if !env.contains_key(&"FAT_LTO".to_string()) {
394
- rustflags.push("-Clto=off".to_string());
395
- }*/
396
390
// FIXME(antoyo): remove once the atomic shim is gone
397
391
if os_name == "Darwin" {
398
392
rustflags. extend_from_slice ( & [
Original file line number Diff line number Diff line change @@ -489,7 +489,6 @@ fn thin_lto(
489
489
//let path = module_buffer.0.to_str().expect("path");
490
490
//let my_path = PathBuf::from(path);
491
491
//let exists = my_path.exists();
492
- //println!("Path: {:?}: {}", path, exists);
493
492
/*module.module_llvm.should_combine_object_files = true;
494
493
module
495
494
.module_llvm
@@ -626,11 +625,6 @@ pub unsafe fn optimize_thin_module(
626
625
match * module {
627
626
SerializedModule :: Local ( ref module_buffer) => {
628
627
let path = module_buffer. 0 . to_str ( ) . expect ( "path" ) ;
629
-
630
- //let my_path = PathBuf::from(path);
631
- //let exists = my_path.exists();
632
- //println!("Path2: {:?}: {}", path, exists);
633
-
634
628
context. add_driver_option ( path) ;
635
629
should_combine_object_files = true ;
636
630
/*module.module_llvm.should_combine_object_files = true;
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ pub(crate) unsafe fn codegen(
57
57
. generic_activity_with_arg ( "GCC_module_codegen_emit_bitcode" , & * module. name ) ;
58
58
context. add_command_line_option ( "-flto=auto" ) ;
59
59
context. add_command_line_option ( "-flto-partition=one" ) ;
60
+ // TODO: remove since we don't want fat objects when it is for Bitcode only.
61
+ context. add_command_line_option ( "-ffat-lto-objects" ) ;
60
62
context
61
63
. compile_to_file ( OutputKind :: ObjectFile , bc_out. to_str ( ) . expect ( "path to str" ) ) ;
62
64
}
@@ -135,7 +137,6 @@ pub(crate) unsafe fn codegen(
135
137
obj_out. to_str ( ) . expect ( "path to str" ) ,
136
138
) ;
137
139
} else {
138
- //println!("Combining to object file");
139
140
context. compile_to_file (
140
141
OutputKind :: ObjectFile ,
141
142
obj_out. to_str ( ) . expect ( "path to str" ) ,
Original file line number Diff line number Diff line change @@ -94,3 +94,4 @@ tests/ui/consts/const-eval/parse_ints.rs
94
94
tests/ui/simd/intrinsic/generic-arithmetic-pass.rs
95
95
tests/ui/backtrace/backtrace.rs
96
96
tests/ui/lifetimes/tail-expr-lock-poisoning.rs
97
+ tests/ui/runtime/rt-explody-panic-payloads.rs
You can’t perform that action at this time.
0 commit comments