diff options
| author | Stefan Boberg <[email protected]> | 2026-03-16 10:52:45 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-16 10:52:45 +0100 |
| commit | 79e10a165cf09dc2cc120b3a226c51f87c235f20 (patch) | |
| tree | cf51b07e097904044b4bf65bc3fe0ad14134074f /thirdparty | |
| parent | Linux build improvements (#843) (diff) | |
| download | zen-79e10a165cf09dc2cc120b3a226c51f87c235f20.tar.xz zen-79e10a165cf09dc2cc120b3a226c51f87c235f20.zip | |
Enable cross compilation of Windows targets on Linux (#839)
This PR makes it *possible* to do a Windows build on Linux via `clang-cl`.
It doesn't actually change any build process. No policy change, just mechanics and some code fixes to clear clang compilation.
The code fixes are mainly related to #include file name casing, to match the on-disk casing of the SDK files (via xwin).
Diffstat (limited to 'thirdparty')
| -rw-r--r-- | thirdparty/xmake.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/thirdparty/xmake.lua b/thirdparty/xmake.lua index f06eb6fff..e8832d50a 100644 --- a/thirdparty/xmake.lua +++ b/thirdparty/xmake.lua @@ -36,7 +36,7 @@ target('rpmalloc') set_kind("static") set_group('thirdparty') set_languages("c17", "cxx20") - if is_os("windows") then + if is_os("windows") and not (get_config("toolchain") or ""):find("clang") then add_cflags("/experimental:c11atomics", {force=true, tools="cl"}) end add_defines("RPMALLOC_FIRST_CLASS_HEAPS=1", "ENABLE_STATISTICS=1", "ENABLE_OVERRIDE=0") @@ -82,7 +82,7 @@ target("blake3") add_headerfiles("blake3/c/blake3.h") add_includedirs("blake3/c", {public=true}) - if is_os("windows") then + if is_os("windows") and not (get_config("toolchain") or ""):find("clang") then add_cflags("/experimental:c11atomics", {tools="cl"}) add_cflags("/wd4245", {force = true}) -- conversion from 'type1' to 'type2', possible loss of data elseif is_os("macosx") then |