Skip to content

extern "C" functions are not internalized with -C lto #18134

@Zoxc

Description

@Zoxc

When marking public functions with #[no_mangle] and then linking to the crate with the functions using -C lto, the functions will be exported in the output.

This can result in errors about duplicate definitions (when linking things linked with -C lto together) and also prevents the removal of unused functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationI-slowIssue: Problems and improvements with respect to performance of generated code.P-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions