Rust version of __attribute(used)__
(GCC) or llvm.used
(LLVM).
#23577
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
There come times when rust symbols are referenced only by external assembler. It seems rustc is eager to remove them (especially with
-C lto
, even making them public does not help).In clang and gcc there are ways to prevent it, correspondingly:
llvm.used`
__attribute__((used))
andIf there's a way to get the same behavior in Rust? If not, can be added?
The text was updated successfully, but these errors were encountered: