Skip to content

Compiling to Shared Library doesn't always expose reexported symbols #50007

Closed
@CryZe

Description

@CryZe

Consider the following:

We have 2 crates, rlib helper and the shared library foo that depends on the helper crate. The helper crate's lib.rs looks like this:

#[no_mangle]
pub extern fn bla() -> i32 {
    5
}

The shared library's lib.rs looks like this:

extern crate helper;

pub use helper::bla;

The code is then compiled to a shared library. The bla symbol is not exported. That does not seem intentional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions