rust/compiler/rustc_codegen_llvm/src
Matthias Krüger 379979951e
Rollup merge of #147150 - nikic:alloc-shim-attributes, r=bjorn3
Emit allocator attributes for allocator shim

This emits the same attributes we place on allocator declarations on the definitions in the allocator shim as well. This complements https://github.com/rust-lang/rust/pull/146766, which added the attribute for `#[global_allocator]` definitions. Emitting the attributes on the definitions ensures that they cannot be lost of the allocator shim participates in LTO.

See https://github.com/rust-lang/rust/issues/145995 for context, though that one was about `#[global_allocator]`. I'm not sure whether this can occur with the allocator shim as well or not, but better safe than sorry.

I'm not sure whether there is any good way to test this, as the allocator shim is not part of `--emit=llvm-ir`. I've verified this locally by inspecting the bitcode produced by `-C save-temps`.

r? ``@bjorn3``
2025-09-29 21:42:44 +02:00
..
back Rollup merge of #144197 - KMJ-007:type-tree, r=ZuseZ4 2025-09-28 18:13:11 +02:00
builder Add TypeTree metadata attachment for autodiff 2025-09-19 04:02:19 +00:00
coverageinfo coverage: Remove all unstable support for MC/DC instrumentation 2025-08-06 22:38:52 +10:00
debuginfo remove explicit deref of AbiAlign for most methods 2025-09-28 15:02:14 -07:00
llvm Rollup merge of #144197 - KMJ-007:type-tree, r=ZuseZ4 2025-09-28 18:13:11 +02:00
abi.rs Rollup merge of #144197 - KMJ-007:type-tree, r=ZuseZ4 2025-09-28 18:13:11 +02:00
allocator.rs Emit allocator attributes for allocator shim 2025-09-29 11:29:59 +02:00
asm.rs Rollup merge of #146831 - taiki-e:powerpc-clobber, r=Amanieu 2025-09-22 20:25:14 +10:00
attributes.rs Use standard attribute logic for allocator shim 2025-09-25 10:04:40 +02:00
base.rs Use standard attribute logic for allocator shim 2025-09-25 10:04:40 +02:00
builder.rs Rollup merge of #144197 - KMJ-007:type-tree, r=ZuseZ4 2025-09-28 18:13:11 +02:00
callee.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
common.rs initial implementation of the darwin_objc unstable feature 2025-09-13 16:06:22 -07:00
consts.rs compiler: remove AbiAlign inside TargetDataLayout 2025-09-27 22:13:53 -07:00
context.rs Rollup merge of #146778 - nikic:allocator-shim-attributes, r=jackh726 2025-09-26 18:11:11 +02:00
declare.rs Use standard attribute logic for allocator shim 2025-09-25 10:04:40 +02:00
errors.rs Use the object crate rather than LLVM for extracting bitcode sections 2025-07-25 11:21:28 +00:00
intrinsic.rs Rollup merge of #147134 - workingjubilee:remove-explicit-abialign-deref, r=Zalathar 2025-09-29 15:44:55 +10:00
lib.rs Rollup merge of #147127 - antoyo:fix/gcc-linker-plugin, r=bjorn3 2025-09-29 11:56:44 +10:00
llvm_util.rs Add panic=immediate-abort 2025-09-21 13:12:18 -04:00
mono_item.rs Replace the llvm::Bool typedef with a proper newtype 2025-08-24 23:09:54 +10:00
type_.rs Rename llvm::Bool aliases to standard const case 2025-08-24 23:09:54 +10:00
type_of.rs Auto merge of #145717 - BoxyUwU:erase_regions_rename, r=lcnr 2025-09-09 15:04:44 +00:00
typetree.rs autodiff: typetree recursive depth query from enzyme with fallback 2025-09-19 05:42:27 +00:00
va_arg.rs Rollup merge of #147134 - workingjubilee:remove-explicit-abialign-deref, r=Zalathar 2025-09-29 15:44:55 +10:00
value.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00