Skip to content

Add cmd option to pass Rustc arguments containing spaces #6184

Closed
@humenda

Description

@humenda

I am trying to pass pre-link-args and link-args to Rustc using Cargo. These dynamic an hence cannot be in the Cargo.toml. Since they contain spaces, I cannot use CARGO_RUSTC_FLAGS. If cargo had an option as --rustc-arg=, it would be possible to pass (multiple) arguments through to Rust, even if some would contain spaces. This could be useful for passing library paths, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cliArea: Command-line interface, option parsing, etc.A-rustflagsArea: rustflagsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions