Skip to content

#[link(name=…)] makes life hard for non-cargo build systems #47641

Open
@P-E-Meunier

Description

@P-E-Meunier

I'm not sure how that feauter is handled by rustc (and cargo?).

My Nix-based build system (carnix) cannot build packages using it, because it has no way to tell a library declared in this way has to be used (I tried just grepping over the source files, but that fails because some modules might not get compiled, depending on the platform and features).

I'd like at least one of the following:

  • help on what options I need to pass to rustc in order to compile these crates anyway,
  • or a new command in cargo and/or in rustc to output flags for these files (such as cargo:rustc-flags=…) without compiling anything, that can then be passed to rustc to actually compile the crate.

Activity

added
T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
on Jan 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-dev-toolsRelevant to the dev-tools subteam, 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

        Participants

        @TimNN@jonas-schievink@P-E-Meunier

        Issue actions

          #[link(name=…)] makes life hard for non-cargo build systems · Issue #47641 · rust-lang/rust