Skip to content

Public "stdcall" symbol not exported on cdylib on i686-pc-windows-gnu #50176

Open
@YaLTeR

Description

I'm making a cdylib crate which exports a function in the following manner:

#[no_mangle]
pub extern "system" fn SomeFunction() {}

The library is then supposed to be loaded by another program at runtime and the function dlsym'd from it.

This works everywhere (32/64-bit Linux, macOS, 32/64-bit Windows MSVC, 64-bit Windows GNU) except the i686-pc-windows-gnu target where the function isn't being exported from the resulting DLL for some reason.

Minimal example is the code above in a clean crate with crate-type = ["cdylib"].

Possibly related: #50007, although for me the bug occurrs in both debug and release.

Rust: stable (1.25.0), beta, nightly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-FFIArea: Foreign function interface (FFI)A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.O-windows-gnuToolchain: GNU, Operating system: WindowsO-x86_32Target: x86 processors, 32 bit (like i686-*)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