Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo-xwin ignores rustflags from cargo config file #36

Closed
ancwrd1 opened this issue Jan 8, 2023 · 4 comments · Fixed by #37, #38 or #39
Closed

cargo-xwin ignores rustflags from cargo config file #36

ancwrd1 opened this issue Jan 8, 2023 · 4 comments · Fixed by #37, #38 or #39
Labels
enhancement New feature or request

Comments

@ancwrd1
Copy link

ancwrd1 commented Jan 8, 2023

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.

@messense
Copy link
Member

messense commented Jan 8, 2023

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.

@ancwrd1
Copy link
Author

ancwrd1 commented Jan 8, 2023

Thanks a lot for a quick fix!

@messense
Copy link
Member

messense commented Jan 9, 2023

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

@messense
Copy link
Member

messense commented Jan 9, 2023

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

This is now implemented in #39

@messense messense linked a pull request Jan 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants