-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Private #[no_mangle] symbols are exported from a cdylib #98449
Copy link
Copy link
Open
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In C++ (MSVC) un-mangling and exporting are controlled via
extern "C"and__declspec(dllexport)respectively.In Rust, however, all
#[no_mangle]functions are exported from the finalcdylib.It seems that it is not possible to define an un-mangled and un-exported symbol in Rust.