Skip to content

Commit 8a2a9db

Browse files
committed
Fix LTO errors by not adding AlwaysInline to __rust_alloc_error_handler_should_panic_v2
1 parent 2b64021 commit 8a2a9db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/allocator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ fn create_const_value_function(
104104
tcx.sess.default_visibility(),
105105
)));
106106

107-
func.add_attribute(FnAttribute::AlwaysInline);
107+
// FIXME(antoyo): cg_llvm sets AlwaysInline, but AlwaysInline is different in GCC and using
108+
// it here will causes linking errors when using LTO.
108109
func.add_attribute(FnAttribute::Inline);
109110
}
110111

0 commit comments

Comments
 (0)