Skip to content

artifact-dependencies doesn't support building binaries for multiple targets #12374

Description

@tamird

Problem

build.target supports multiple targets, and the documentation indicates that it will be built for all of them. The equivalent behavior can be very useful for bindeps as well, e.g. when the binary is to be embedded into another binary, as is commonly done with BPF programs.

Proposed Solution

Accept an array of targets and expose CARGO_<ARTIFACT-TYPE>_DIR_<DEP> and CARGO_<ARTIFACT-TYPE>_FILE_<DEP>_<NAME> as lists in the manner of CARGO_ENCODED_RUSTFLAGS.

Notes

RFC-3176 (#10030, #10061) address the same desired functionality in a different way. If there is a reason that accepting a string of multiple versions was considered and rejected, it is not documented. cc @joshtriplett @Byron

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Z-bindepsNightly: binary artifact dependencies

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions