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
Cross-compilation should now work out of the box in v0.1.13 of my fork. I updated the README as well, it had some buggy instructions (target_os is the host OS when you compile build.rs).
I'm cross compiling from linux to windows, but I found it not work.
I checked the history issue and found that the problem is still unresolved.
However, in the course of my continuous testing, I found that the
cfg
conditional judgment in the build script does not work.My Test Demo
host system
$ uname -a Linux alex 5.13.19-2-MANJARO #1 SMP PREEMPT Sun Sep 19 21:31:53 UTC 2021 x86_64 GNU/Linux
target: x86_64-unknown-linux-gnu (local)
That's fine, however when cross compile...
target: x86_64-pc-windows-gnu (cross compile)
I expect it to output
window
ortarget_os = windows
, but it panic atunix
My solution
I think it may be because some features were not determined when
build.rs
was compiled and the features not been passed to rustc.I have found some environment variables from the documentation and they can be used to determine target and host.
The text was updated successfully, but these errors were encountered: