Skip to content

crt-static is only translated to -static under gcc, not clang #1074

Open
@mqudsi

Description

@mqudsi

In add_default_flags(), the presence of feature crt-static causes -static to be supplied to the compiler iff it's gcc; clang doesn't get the same treatment.

I know that cc itself doesn't compile without -c so the presence of -static makes no difference there, but if a downstream library or crate uses cc to manually get a compiler invocation and runs that without -c to generate an executable itself in build.rs (and some do), it matters.

I can easily open a PR to do the same under clang, but given the subtleties of how much linker-related stuff this crate should be doing to begin with I preferred to first open an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions