-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 building zig with clang-cl on Windows #20331
Conversation
Note that changes to cc @kcbanner |
@alexrp I updated lib/zig.h with changes from stage1/zig.h. It now compiles with clang-cl even if stage1/zig.h is replaced with the one from lib. |
You still need to revert the changes to (Also, this has merge conflicts that need to be resolved.) |
Co-authored-by: Alex Rønne Petersen <[email protected]>
Co-authored-by: Alex Rønne Petersen <[email protected]>
@alexrp I reverted stage1/zig.h and made the suggested changes to lib/zig.h |
When building zig with clang-cl 18 on Windows, there were couple of issues:
With this patch, it is possible to compile zig on Windows with clang as MSVC replacement. Target triple is x86_64-windows-msvc.
Sample build script - build-zig-stage3.cmd: