diff options
| author | Ben Kimock <kimockb@gmail.com> | 2025-08-04 13:10:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-04 13:10:09 +0000 |
| commit | ee1b237215ee90df2c0102457fa2d0e9c2df8753 (patch) | |
| tree | d7b99f917db35f8a07550c15b2544e0563612b5e /compiler/rustc_codegen_gcc/src/allocator.rs | |
| parent | ee00b998177899c10bea83a38c46627f27496ba2 (diff) | |
| parent | ab7c35995d9489821cc8b70ac1da069090ee56c9 (diff) | |
| download | rust-ee1b237215ee90df2c0102457fa2d0e9c2df8753.tar.gz rust-ee1b237215ee90df2c0102457fa2d0e9c2df8753.zip | |
Merge pull request #4513 from rust-lang/rustup-2025-08-04
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/allocator.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/allocator.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_gcc/src/allocator.rs b/compiler/rustc_codegen_gcc/src/allocator.rs index 0d8dc93274f..2a95a7368aa 100644 --- a/compiler/rustc_codegen_gcc/src/allocator.rs +++ b/compiler/rustc_codegen_gcc/src/allocator.rs @@ -99,11 +99,15 @@ fn create_const_value_function( let func = context.new_function(None, FunctionType::Exported, output, &[], name, false); #[cfg(feature = "master")] - func.add_attribute(FnAttribute::Visibility(symbol_visibility_to_gcc( - tcx.sess.default_visibility(), - ))); - - func.add_attribute(FnAttribute::AlwaysInline); + { + func.add_attribute(FnAttribute::Visibility(symbol_visibility_to_gcc( + tcx.sess.default_visibility(), + ))); + + // 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); + } if tcx.sess.must_emit_unwind_tables() { // TODO(antoyo): emit unwind tables. |
