You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO(antoyo): Send -plugin/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/liblto_plugin.so to linker (this should be done when specifying the appropriate rustc cli argument).
86
-
context.compile_to_file(
87
-
OutputKind::ObjectFile,
88
-
bc_out.to_str().expect("path to str"),
89
-
);
90
-
}
91
-
}else{
92
-
if config.emit_bc || config.emit_obj == EmitObj::Bitcode{
// TODO(antoyo): Send -plugin/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/liblto_plugin.so to linker (this should be done when specifying the appropriate rustc cli argument).
114
-
context.compile_to_file(
115
-
OutputKind::ObjectFile,
116
-
bc_out.to_str().expect("path to str"),
117
-
);
118
-
}
56
+
// TODO(antoyo): Send -plugin/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/liblto_plugin.so to linker (this should be done when specifying the appropriate rustc cli argument).
57
+
context
58
+
.compile_to_file(OutputKind::ObjectFile, bc_out.to_str().expect("path to str"));
// NOTE: without -fuse-linker-plugin, we get the following error:
173
-
// lto1: internal compiler error: decompressed stream: Destination buffer is too small
174
-
// TODO(antoyo): since we do not do LTO when the linker is invoked anymore, perhaps
175
-
// the following flag is not necessary anymore.
176
-
context.add_driver_option("-fuse-linker-plugin");
177
-
}
178
-
179
108
context.add_driver_option("-Wl,-r");
180
109
// NOTE: we need -nostdlib, otherwise, we get the following error:
181
110
// /usr/bin/ld: cannot find -lgcc_s: No such file or directory
182
111
context.add_driver_option("-nostdlib");
183
112
184
113
let path = obj_out.to_str().expect("path to str");
185
114
186
-
if fat_lto {
187
-
let lto_path = format!("{}.lto", path);
188
-
// cSpell:disable
189
-
// FIXME(antoyo): The LTO frontend generates the following warning:
190
-
// ../build_sysroot/sysroot_src/library/core/src/num/dec2flt/lemire.rs:150:15: warning: type of ‘_ZN4core3num7dec2flt5table17POWER_OF_FIVE_12817ha449a68fb31379e4E’ does not match original declaration [-Wlto-type-mismatch]
191
-
// 150 | let (lo5, hi5) = POWER_OF_FIVE_128[index];
192
-
// | ^
193
-
// lto1: note: ‘_ZN4core3num7dec2flt5table17POWER_OF_FIVE_12817ha449a68fb31379e4E’ was previously declared here
194
-
//
195
-
// This option is to mute it to make the UI tests pass with LTO enabled.
0 commit comments