]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #8987 - jonhoo:metadata-target-filtering, r=ehuss
authorbors <bors@rust-lang.org>
Sat, 19 Dec 2020 15:23:22 +0000 (15:23 +0000)
committerbors <bors@rust-lang.org>
Sat, 19 Dec 2020 15:23:22 +0000 (15:23 +0000)
Make cargo metadata and tree respect target

Previously, the `metadata` and `tree` subcommands would download
dependencies for all targets, regardless of whether those targets were
actually enabled. This PR updates them so that they only download the
same dependencies that building would do with the requested target(s).

`cargo metadata` still includes all targets by default; you can only opt
_out_ using `--filter-platform`. Ideally it should use `--target` the
same way `tree` does, but it's too late to change that now.

Fixes #8981.


Trivial merge