Skip to content

Stop forwarding -L "" to compiler drivers; reject or ignore instead #23303

Closed
@rprichard

Description

@rprichard

The current Rust build system passes -L "" to rustc when LLVM_STDCPP_LOCATION_<XXX> is blank (which seems to be the default situation). -L "" does not appear to do anything useful. rustc forwards -L "" to the compiler driver correctly, but both the gcc and clang compiler drivers forward it to ld in a way that breaks the subsequent ld command-line option. (They convert -L "" to just -L.)

Perhaps the rustc driver should reject -L "" instead. It already rejects -l "".

Alternatively, it could quietly ignore -L "". Another alternative is to fix gcc and clang.

I discovered this issue while investigating a FreeBSD build failure (#23287).

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