diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-09-29 21:42:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-29 21:42:44 +0200 |
| commit | 379979951ed3610d31f63222a479fbcafabe0151 (patch) | |
| tree | 430301bed6a9de688c2d62439900fb505bd62713 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 967e64279ac2695b1767f226d5b6e5cada3d67f4 (diff) | |
| parent | af8fd78142bf394ac904402adb736f4c2f1efbc6 (diff) | |
| download | rust-379979951ed3610d31f63222a479fbcafabe0151.tar.gz rust-379979951ed3610d31f63222a479fbcafabe0151.zip | |
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``
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
