Skip to content

Support rustc-link-args in order to properly pass -pthread and flags #7796

Closed
@infinity0

Description

@infinity0
Contributor

On rust-lang/rust#62117 it was discovered that certain C/C++ dependencies need to be linked with -pthread instead of -lpthread on certain platforms such as riscv64 and some arm cases.

Currently there is no way for a build.rs script to express this however. The closest thing is rustc-dylib-link-args which only applies when building a cdylib.

Activity

added
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
on Jan 14, 2020
joshtriplett

joshtriplett commented on Jan 18, 2020

@joshtriplett
Member
XieJiSS

XieJiSS commented on Dec 11, 2021

@XieJiSS

Just a reminder: This should be closed by #8441

ehuss

ehuss commented on Dec 11, 2021

@ehuss
Contributor

Closing, as it does sound like this is resolved, at least when using build scripts (docs).

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-build-scriptsArea: build.rs scriptsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`T-cargoTeam: Cargo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ehuss@infinity0@joshtriplett@XieJiSS

        Issue actions

          Support `rustc-link-args` in order to properly pass `-pthread` and flags · Issue #7796 · rust-lang/cargo