Skip to content

The cargo build --bins re-builds binaries again after cargo build --all-targets #13844

Open
@achary

Description

@achary

Problem

There seem to be unnecessary build happening in the following sequence.

cargo build --release --all-targets
cargo build --release --bins

Not sure that his matters, but my setup uses workspace.

Steps

  1. Run cargo build --release --all-targets
  2. Immediately after run cargo build --release --bins

At step 2. I would expect getting just a "Finished" message straight away, with no re-build happening in between steps 1. and 2., as the --all-targets conceptually include building full set of binary executables already.

Possible Solution(s)

No response

Notes

No response

Version

rustc 1.77.1
cargo 1.77.1 (e52e36006 2024-03-26)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-featuresArea: features — conditional compilationA-workspacesArea: workspacesC-bugCategory: bugS-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions