@@ -143,23 +143,12 @@ impl ModuleConfig {
143
143
144
144
let emit_obj = if !should_emit_obj {
145
145
EmitObj :: None
146
- } else if sess. target . obj_is_bitcode
147
- || ( sess. opts . cg . linker_plugin_lto . enabled ( ) && !no_builtins)
148
- {
146
+ } else if sess. target . obj_is_bitcode || sess. opts . cg . linker_plugin_lto . enabled ( ) {
149
147
// This case is selected if the target uses objects as bitcode, or
150
148
// if linker plugin LTO is enabled. In the linker plugin LTO case
151
149
// the assumption is that the final link-step will read the bitcode
152
150
// and convert it to object code. This may be done by either the
153
151
// native linker or rustc itself.
154
- //
155
- // Note, however, that the linker-plugin-lto requested here is
156
- // explicitly ignored for `#![no_builtins]` crates. These crates are
157
- // specifically ignored by rustc's LTO passes and wouldn't work if
158
- // loaded into the linker. These crates define symbols that LLVM
159
- // lowers intrinsics to, and these symbol dependencies aren't known
160
- // until after codegen. As a result any crate marked
161
- // `#![no_builtins]` is assumed to not participate in LTO and
162
- // instead goes on to generate object code.
163
152
EmitObj :: Bitcode
164
153
} else if need_bitcode_in_object ( tcx) {
165
154
EmitObj :: ObjectCode ( BitcodeSection :: Full )
0 commit comments