-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix cargo-xwin build by using CARGO_CFG_TARGET_OS
env var instead of #[cfg(target_os = "x")
#96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Likewise, but I wonder what happened to the checks here... can you maybe push another commit to re-run the CI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, great catch.
Problem is it 404s in some packages. Me committing somethings won't change anything, as I see that you tried to re-run the jobs Maybe something's wrong? |
I've fixed CI in #97. Once it's merged, you can rebase and we can merge this. |
If you rebase CI should be passing. Thanks. |
just fixed the formatting |
@meme can you please cut a version with this change? |
Done! |
To my surprise something is wrong with the
#[cfg(target_os = "whatever")]
. My journey started when I tried to build my project that uses thefrida
crate usingcargo-xwin
- I wanted to cross-compile it from a linux host to targetx86_64-pc-windows-msvc
. When I did that the linker nagged that it couldn't findpthread.lib
andresolv.lib
- which are not windows libraries. They shouldn't be required. The problem was that for some reason thetarget_os
value was not set according to the target but rather according to the hostI THINK it's due to the
build.rs
being targeted to the host (as it's the build script).Some useful links:
If this gets merged can we get a new patch release please?