Skip to content

Default to host platform for cargo metadata#6912

Merged
bors[bot] merged 3 commits into
rust-lang:masterfrom
jonhoo:metadata-for-target
Dec 17, 2020
Merged

Default to host platform for cargo metadata#6912
bors[bot] merged 3 commits into
rust-lang:masterfrom
jonhoo:metadata-for-target

Conversation

@jonhoo

@jonhoo jonhoo commented Dec 17, 2020

Copy link
Copy Markdown
Contributor

This modifies the logic for calling cargo metadata so that it will use
the host platform if no explicit target platform is given. This is
needed since cargo metadata defaults to outputting information for all
targets.

Fixes #6908.

This modifies the logic for calling cargo metadata so that it will use
the host platform if no explicit target platform is given. This is
needed since cargo metadata defaults to outputting information for _all_
targets.

Fixes rust-lang#6908.
Comment thread crates/project_model/src/cargo_workspace.rs Outdated
@matklad

matklad commented Dec 17, 2020

Copy link
Copy Markdown
Contributor

Makes sense!

In generally, cargo metadata is fundamentally lossy (what we actually want to get our hands on is the internal unit-graph in cargo), but this should help us to be less incorrect.

r=me with prefix stripping simplified!

bors d+

@bors

bors Bot commented Dec 17, 2020

Copy link
Copy Markdown
Contributor

✌️ jonhoo can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

jonhoo and others added 2 commits December 17, 2020 13:18
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
@jonhoo

jonhoo commented Dec 17, 2020

Copy link
Copy Markdown
Contributor Author

🎉

bors r+

@bors

bors Bot commented Dec 17, 2020

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only use metadata for current target

2 participants