Skip to content

Can't specify linker arguments with space in them #35440

Closed
@jethrogb

Description

@jethrogb

Executing rustc -C link-args=... results in the ... being split by whitespace and each element being supplied as a single argument to the linker. This means it's not possible to specify a linker argument with whitespace in it (for example, a path to a linker script) on the command line. The same applies to the #[link_args] attribute. Possible solutions are parsing some kind of escaping (fragile) and allowing setting multiple link-arg arguments, each of which individually is not whitespace-split.

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