Skip to content

rustc randomly fail to link with C program #111083

Open
@xclaesse

Description

@xclaesse

Here is a minimal test case to reproduce: https://github.com/xclaesse/rustc-bug.

I believe this is the same issue than #55931 initially discovered this issue while working on this Meson PR: mesonbuild/meson#11714.

I suspect the problem is when compiling both cdylib and staticlib for the same stuff.rs with the same crate name, they use some common intermediary files.

Metadata

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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions