Skip to content

Building for host architecture and then another target invalidates cache #10839

@ryanbai1412

Description

@ryanbai1412

Problem

  1. Run cargo build and wait for the build to finish
  2. Run cargo build --target <target triple> for a few seconds
  3. Run cargo build again, the build restarts from scratch

I would expect step 3 to not rebuild from scratch and instead use the cached artifacts produced in step 1.

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.62.0 (a748cf5a3 2022-06-08)
release: 1.62.0
commit-hash: a748cf5a3e666bc2dcdf54f37adef8ef22196452
commit-date: 2022-06-08
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:OpenSSL/1.1.1n)
os: Ubuntu 22.04 (jammy) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions