about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2025-08-01 10:40:19 -0400
committerAntoni Boucher <bouanto@zoho.com>2025-08-01 10:40:19 -0400
commit8a2a9db29eca4468eb1ccf58183b01fe61d00120 (patch)
tree16cfab6451905f8ac67eaf2ec04873448e3f1c13
parent2b640216aea9527c67c82cfc781d979247ac6028 (diff)
Fix LTO errors by not adding AlwaysInline to __rust_alloc_error_handler_should_panic_v2
-rw-r--r--src/allocator.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/allocator.rs b/src/allocator.rs
index 66258390d90..2a95a7368aa 100644
--- a/src/allocator.rs
+++ b/src/allocator.rs
@@ -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);
     }