Stuart Cook 46e25aa7a3
Rollup merge of #146766 - nikic:global-alloc-attr, r=nnethercote
Add attributes for #[global_allocator] functions

Emit `#[rustc_allocator]` etc. attributes on the functions generated by the `#[global_allocator]` macro, which will emit LLVM attributes like `"alloc-family"`. If the module with the global allocator participates in LTO, this ensures that the attributes typically emitted on the allocator declarations are not lost if the definition is imported.

There is a similar issue when the allocator shim is used, but I've opted not to fix that case in this PR, because doing that cleanly is somewhat gnarly.

Related to https://github.com/rust-lang/rust/issues/145995.
2025-09-25 20:31:56 +10:00
..
2025-08-09 15:47:01 +08:00
2025-08-09 15:47:01 +08:00
2025-08-09 15:47:01 +08:00
2025-07-14 22:29:28 +02:00
2025-08-09 15:47:01 +08:00
2025-08-09 15:47:01 +08:00
2025-05-10 08:58:47 +10:00
2025-09-12 00:01:38 +02:00
2025-08-09 15:47:01 +08:00
2025-08-09 15:47:01 +08:00
2025-09-21 13:12:18 -04:00
2025-08-09 15:47:01 +08:00