-
Notifications
You must be signed in to change notification settings - Fork 553
Windows Support (2025) #691
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
base: develop
Are you sure you want to change the base?
Conversation
Thank you for your pull request. We require contributors to agree to our Contributor License Agreement (https://exaloop.io/legal/cla), and we don't have @K0lb3 on file. In order for us to review and merge your code, please email info@exaloop.io to get yourself added. |
My first milestone for this PR is that the codon target compiles successfully. |
llvm and MinGW from choco might be "incompatible" for this project, as the llvm package seems to be targeting msvc. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
Small update. GCC x LLVM is quite the pain on Windows. For GCC and its libs MinGW can be used just fine, but LLVM in combination with that is annoying.
llvm-mingw doesn't include some header files used by codon, |
Well, more fun. llvm-openmp uses an masm format asm for Windows (32x and 64x), and MinGW doesn't ship an masm assembler. At the very least arm isn't affected by this, as llvm seems to use a (linux) gcc based asm for it. Oh, and to add on top, |
long long story |
My latest compile history is this (2025/7/18).
|
I also started to adjust some of the dependencies in the Using read.c & allloc.c instead of mmapio.c & mmap.c for backtrace, |
@K0lb3 Do you joined exaloop/codon's DC server? maybe we can have a chat there |
@K0lb3 have you tried using MSYS2? I see they have the package mingw-w64-x86_64-llvm-openmp in their repository. If you install base-devel package (its dependencies are installed automatically) it provides you with a *nix development environment, but produces native Windows executables. You can install both GCC and clang. P.S.: don't forget to check this page: Environments. |
@TaiXeflar obviously you don't know what MSYS2 is and didn’t bother to look at the links I included in my message, did you? MSYS2 packages are usually precompiled binaries. I quote from MSYS2 home page:
Follow this link to mingw-w64-x86_64-llvm-openmp package: you'll see there is a separate link to sources and under "Build Dependencies" you'll see there another MSYS2 package listed, mingw-w64-x86_64-uasm, a free MASM-compatible assembler based on JWasm (mingw-w64). If required, the software can be rebuilt from sources from within MSYS2. |
This PR is a new attempt to make codon work on Windows (#69 )
It isn't a continuation of the (very) dated #403 .
At the moment this PR doesn't work yet, serving primarily as visible progress and for communication.
The commits marked as WIP should be removed/squashed before this draft PR becomes a real PR.
The setup I'm using is MinGW (13.2), LLVM (20.1.8), CMake (4.1.0), all installed via chocolatey.
The value of CODON_SYSTEM_LIBRARIES is currently irrelevant for Windows and the functionality might have to be adjusted slightly.
#675 might help a lot for making codon work well on Windows, as non-system shared libraries are a bit iffy on Windows, and well, actually even system ones due to some rare few breaking changes.
TODO:
[x] no compile errors
[ ] no linking errors
[ ] tests pass
[ ] lib copying works