File tree Expand file tree Collapse file tree 5 files changed +4
-15
lines changed Expand file tree Collapse file tree 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
121121
122122### LTO
123123
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 ` .
126125
127126Failing to set ` EMBED_LTO_BITCODE ` will give you the following error:
128127
Original file line number Diff line number Diff line change @@ -387,12 +387,6 @@ impl ConfigInfo {
387387 rustflags. push ( "-Csymbol-mangling-version=v0" . to_string ( ) ) ;
388388 }
389389
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- }*/
396390 // FIXME(antoyo): remove once the atomic shim is gone
397391 if os_name == "Darwin" {
398392 rustflags. extend_from_slice ( & [
Original file line number Diff line number Diff line change @@ -489,7 +489,6 @@ fn thin_lto(
489489 //let path = module_buffer.0.to_str().expect("path");
490490 //let my_path = PathBuf::from(path);
491491 //let exists = my_path.exists();
492- //println!("Path: {:?}: {}", path, exists);
493492 /*module.module_llvm.should_combine_object_files = true;
494493 module
495494 .module_llvm
@@ -626,11 +625,6 @@ pub unsafe fn optimize_thin_module(
626625 match * module {
627626 SerializedModule :: Local ( ref module_buffer) => {
628627 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-
634628 context. add_driver_option ( path) ;
635629 should_combine_object_files = true ;
636630 /*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(
5757 . generic_activity_with_arg ( "GCC_module_codegen_emit_bitcode" , & * module. name ) ;
5858 context. add_command_line_option ( "-flto=auto" ) ;
5959 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" ) ;
6062 context
6163 . compile_to_file ( OutputKind :: ObjectFile , bc_out. to_str ( ) . expect ( "path to str" ) ) ;
6264 }
@@ -135,7 +137,6 @@ pub(crate) unsafe fn codegen(
135137 obj_out. to_str ( ) . expect ( "path to str" ) ,
136138 ) ;
137139 } else {
138- //println!("Combining to object file");
139140 context. compile_to_file (
140141 OutputKind :: ObjectFile ,
141142 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
9494tests/ui/simd/intrinsic/generic-arithmetic-pass.rs
9595tests/ui/backtrace/backtrace.rs
9696tests/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