Skip to content

Pre-RFC: Rust version of __attribute(used)__ (GCC) or llvm.used (LLVM). #1002

@dpc

Description

@dpc

There come times when rust symbols are referenced only by external assembler, sometimes in not-trivial way. It seems rustc is eager to remove them (even making them public does not help).

In clang and gcc there are ways to prevent it: __attribute__((used)) and llvm.used

It seems there is currently no way to force rust to retain a symbol? Can it be added?

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions