rust-lang / wg-cargo-std-aware

Repo for working on "std aware cargo"
133 stars 8 forks source link

cannot produce proc-macro on musl host toolchain #52

Closed 12101111 closed 4 years ago

12101111 commented 4 years ago

Programs on musl target normally statically link to musl libc, but can dynamically link using

RUSTFLAGS="-C target-feature=-crt-static" cargo build

see: https://github.com/rust-lang/rust/issues/59302

However, when building a uefi crate, the RUSTFLAGS don't work.

$ cargo build -Z build-std=core --target=x86_64-unknown-uefi
error: cannot produce proc-macro for `uefi-macros v0.2.1` as the target `x86_64-unknown-linux-musl` does not support these crate types
alexcrichton commented 4 years ago

Thanks for the report, but I don't think that this bug is related to -Zbuild-std. This is an issue with just using Cargo in general with --target.