Skip to content

ctor not running for statically linked libraries #27

@fredericvauchelles

Description

@fredericvauchelles

Hi,

I have an issue with the following setup:

  • app crate defines the binary to produce
  • lib crate defines a rust standard library

When using #[ctor] attribute inside the crate lib, it is not called when running the binary built with app.

Using a rust library dependency statically link it so it should also include the ctor function, but it does not seems to be the case.

Am I missing something or is this an unsupported use case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked by another projectbugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions