rust-osdev / cargo-xbuild

Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc.
Apache License 2.0
258 stars 25 forks source link

Pick up xbuild config from workspace manifest #57

Closed ascjones closed 4 years ago

ascjones commented 4 years ago

If the Cargo.toml defines a workspace, then the [package.metadata.cargo-xbuild] may not be picked up, and the default configuration will be used silently .

This is because the current code assumes that the root package is the first one: https://github.com/rust-osdev/cargo-xbuild/blob/master/src/config.rs#L21.

This PR infers the root package via metadata.resolve. It also updates cargo-metadata to the most recent version.

Fixes #54

phil-opp commented 4 years ago

Published as version 0.5.23