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
Problem
build.targetsupports 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>andCARGO_<ARTIFACT-TYPE>_FILE_<DEP>_<NAME>as lists in the manner ofCARGO_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