rust-cross / cargo-xwin

Cross compile Cargo project to Windows MSVC target with ease

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cargo-xwin ignores rustflags from cargo config file

ancwrd1 opened this issue · comments

I have the following in the <project>/.cargo/config.toml file:
[target.x86_64-pc-windows-msvc]
rustflags = "-C target-feature=+crt-static"

This seems to be ignored by cargo xwin build command. When setting it through env variable it works fine:
RUSTFLAGS="-C target-feature=+crt-static" cargo xwin build --target=x86_64-pc-windows-msvc

But that's not ideal.

We don't parse Cargo config files at the moment, it'd be nice to get that from cargo config instead of parsing it by ourself.

Thanks a lot for a quick fix!

Note that there is no support for target.<cfg>.rustflags yet, only target.<target-triple>.rustflags and build.rustflags are supported.

Note that there is no support for target.<cfg>.rustflags yet

This is now implemented in #39