rust-lang/wg-cargo-std-aware

cannot produce proc-macro on musl host toolchain

Closed this issue · 1 comments

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

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

see: rust-lang/rust#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

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.