You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
Since rust-lang/rust#83820#[link_args] attribute was removed. According to specification of that PR new crates should use build scripts with code like that:
println!("cargo:rustc-link-arg-bins={}", arg);
However, the problem is that extra-link-arg is mentioned in the documentation of cargo unstable features, but can't used in cargo-features. So, you can only pass it as CLI option right now.
Steps (it is assumed that you are using x86_64-pc-windows-msvc toolchain)
Hi! Using cargo-features still requires -Zunstable-options, so command-line flags will still be required. It might be possible to support cli flags in the config, but would that address your use case even if you still have to pass -Zunstable-options?
Problem
Since rust-lang/rust#83820
#[link_args]
attribute was removed. According to specification of that PR new crates should use build scripts with code like that:However, the problem is that
extra-link-arg
is mentioned in the documentation of cargo unstable features, but can't used incargo-features
. So, you can only pass it as CLI option right now.Steps (it is assumed that you are using x86_64-pc-windows-msvc toolchain)
git clone --branch=fix-link-args https://github.com/Frago9876543210/min-sized-rust-windows.git
cd min-sized-rust-windows
cargo build --release
Lot of
warning: cargo:rustc-link-arg-bins requires -Zextra-link-arg flag
as result.The only way to bypass that problem is custom aliases or manually adding
-Zextra-link-arg
everywhere.Possible Solution(s)
Make possible to fallback
cargo-features
to-Z <feature-name>
instead of hardcoded values here?cargo/src/cargo/core/features.rs
Lines 218 to 219 in e0f9643
Notes
Output of
cargo version
:Output of
rustc -V --verbose
:The text was updated successfully, but these errors were encountered: