Skip to content

Pass configuration flags to cargo #2899

Open
@tschwinge

Description

@tschwinge

As of #2822 "Start reusing rustc's format_args parser", we invoke cargo to produce object files to be linked into GCC. We currently don't specify any compilation flags and linker to use, so it's easy to run into mismatches between what GCC is configured for (for example, specific linker), and what cargo uses by default (for example, system cc for linking).

For example, the linker may be specified: https://doc.rust-lang.org/cargo/reference/config.html#targettriplelinker -- but do we need the Rust target triple for that (see #2898)? Trying to use a cfg() expressions à la --config "target.'cfg(all())'.linker=[...]" only produces:

warning: unused key `linker` in [target] config table `cfg(all())`

(Maybe I've misunderstood how that is to be used.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    miscupstreamIssue regarding upstreaming gccrs into GCC

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions