-
Notifications
You must be signed in to change notification settings - Fork 107
Windows support #977
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
Comments
I have been focusing on Linux and macOS. There are several places where Windows support is missing:
I did some experimentation on the I don't think I will add Windows support soon, but PR's are of course welcome. |
I got working support for cross compilation from Linux to MinGW on the |
The branch depends on bytecodealliance/wasmtime#1670 and an update to |
Wow amazing work, I will check this out soon! |
The branch now also depends on bytecodealliance/wasmtime#1767 for the |
Updated the |
Patches in
|
9384af4 makes the examples link on windows. 9c943bf and 9164653 together add support for building the sysroot for windows. The examples and sysroot will still fail to build for windows though until the above todo list is fixed. a77ee9e is a workaround for these things when using the old x86 cranelift backend, but I won't merge that commit as it negatively affects other platforms too. |
9c98027 reduced the amount of used 128bit int intrinsics. |
This comment has been minimized.
This comment has been minimized.
Dwarf debuginfo generation will need to be disabled for MSVC:
|
Now, Could it be used on windows? either GNU or MSVC toolchain is fine if it can work, I try to build it on Win10 but failed.
|
Building using both the MSVC and GNU toolchain should work fine. When compiling your own code for MSVC with cg_clif it will likely crash due to something not yet being implemented. With the GNU toolchain everything should work. Compiling code for the GNU toolchain using cg_clif is tested on CI. Compiling cg_clif itself for the MSVC toolchain worked fine in rust-lang/rust#81746. I am not sure why it gives |
I solved the trouble above, but when I want to translate the build.sh to buld.ps1, I found build.sh disallow building on windows
Does it mean I can not build it on windows ? and how to use cg_clif on windows? |
The build system doesn't have support for Windows yet. The main changes required to work on windows are likely to change |
An update on the We've introduced TLS support for the COFF file format in cranelift (bytecodealliance/wasmtime#4546). The Here's an update on the current status of the testsuite on MSVC (only showing failed tests):
|
Once bytecodealliance/wasmtime#4747 lands, we are in pretty good shape for windows support. If anyone wants to test it out in the mean time, this branch enables pretty much everything that we need. As mentioned in https://github.com/bjorn3/rustc_codegen_cranelift/issues/1249#issuecomment-1221358262 we are still missing JIT support, and its currently disabled in the testsuite. I had a go at enabling the JIT tests, but it fails in It panics with: I checked with Edit: Tried to run the Edit2: Opened gimli-rs/object#457 |
bytecodealliance/wasmtime#4747 Is merged! 🎉 . With that I think we should remove the MSVC check on Additionally on my TODO list is adding MSVC to CI. From here, follow up work is the following:
Although I'm quite busy now so I might not get to these anytime soon. |
This should be done now thanks to @afonso360. |
I believe cranelift is cross-platform. At least on windows.
However I only found Bash scripts for building with cargo for example. Is this a limitation, or am I missing something?
If a port from Bash to Batch (or something else like python) is needed I am of course happy to help!
The text was updated successfully, but these errors were encountered: