Fix LTO errors by not adding AlwaysInline to __rust_alloc_error_handler_should_panic_v2

This commit is contained in:
Antoni Boucher 2025-08-01 10:40:19 -04:00
parent 2b640216ae
commit 8a2a9db29e

View File

@ -104,7 +104,8 @@ fn create_const_value_function(
tcx.sess.default_visibility(),
)));
func.add_attribute(FnAttribute::AlwaysInline);
// FIXME(antoyo): cg_llvm sets AlwaysInline, but AlwaysInline is different in GCC and using
// it here will causes linking errors when using LTO.
func.add_attribute(FnAttribute::Inline);
}