diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2025-08-01 10:40:19 -0400 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2025-08-01 10:40:19 -0400 |
| commit | 8a2a9db29eca4468eb1ccf58183b01fe61d00120 (patch) | |
| tree | 16cfab6451905f8ac67eaf2ec04873448e3f1c13 | |
| parent | 2b640216aea9527c67c82cfc781d979247ac6028 (diff) | |
Fix LTO errors by not adding AlwaysInline to __rust_alloc_error_handler_should_panic_v2
| -rw-r--r-- | src/allocator.rs | 3 |
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); } |
