[client/common] windows: fix native clang-cl build

This commit is contained in:
Geoffrey McRae
2026-10-02 20:07:38 +10:00
parent ad0207afc5
commit 78b6a31e7d
5 changed files with 53 additions and 8 deletions

View File

@@ -4,8 +4,8 @@ Build the Windows client
########################
The Windows client uses ``clang-cl`` and the MSVC ABI. ANGLE continues to
provide EGL and OpenGL ES, while MsQuic and its bundled OpenSSL are linked
statically.
provide EGL and OpenGL ES, while MsQuic and the vcpkg-provided OpenSSL are
linked statically.
Requirements
------------
@@ -14,7 +14,7 @@ Install the following tools:
- Visual Studio 2022 Build Tools with the Desktop development with C++
workload, Clang tools for Windows, and a Windows SDK
- CMake 3.21 or newer
- CMake 3.24 or newer
- Ninja, with ``ninja.exe`` available on ``PATH``
- Git
- vcpkg
@@ -30,13 +30,23 @@ works before configuring the client.
Building
--------
Open an x64 Native Tools command prompt or Developer PowerShell, then run:
Open an x64 Native Tools command prompt. Alternatively, initialize a regular
PowerShell session for an x64 host and target first (replace ``Community``
with the installed Visual Studio edition when necessary):
.. code:: powershell
$vsTools = 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools'
& "$vsTools\Launch-VsDevShell.ps1" `
-Arch amd64 -HostArch amd64 -SkipAutomaticLocation
Then run:
.. code:: powershell
git submodule update --init --recursive
cd client
cmake --preset windows-clangcl
cmake --fresh --preset windows-clangcl
cmake --build --preset windows-clangcl-release
The executable is written beneath ``client/build/windows-clangcl``. The