Skip to content

Commit f10916e

Browse files
fujiiRazvan Caliman
authored andcommitted
WindowsPort.md: Switched to clang-cl
Updated the document for the clang-cl migration.
1 parent 0293fa7 commit f10916e

File tree

1 file changed

+12
-32
lines changed

1 file changed

+12
-32
lines changed

docs/Ports/WindowsPort.md

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,22 @@ It supports only 64 bit Windows.
77

88
## Installing Development Tools
99

10-
You need CMake, Perl, Python, Ruby, gperf, the latest Windows SDK, and Visual Studio 2022 to build Windows port.
10+
Install [the latest Visual Studio with "Desktop development with C++" workload](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation).
11+
12+
Install CMake, Perl, Python, Ruby, gperf, LLVM, and Ninja.
1113
You can use [Chocolatey](https://chocolatey.org/) to install the tools.
1214

1315
[ActivePerl chocolatey package](https://community.chocolatey.org/packages/ActivePerl) has a problem and no package maintainer now.
1416
XAMPP includes Perl, and running layout tests needs XAMPP. Install XAMPP instead.
1517

1618
```
17-
choco install -y xampp-81 python ruby git cmake gperf
18-
```
19-
20-
It supports both CMake Ninja generator and CMake Visual Studio generator.
21-
Ninja is optional.
22-
23-
```
24-
choco install -y ninja
19+
choco install -y xampp-81 python ruby git cmake gperf llvm ninja
2520
```
2621

2722
Windows Git enables `autocrlf` by default. But, some layout tests files have to be checked out as LF line end style. See [Bug 240158](https://bugs.webkit.org/show_bug.cgi?id=240158).
2823

2924
```
30-
git config --global core.autocrlf input
25+
git config --global core.autocrlf input
3126
```
3227

3328
### Using winget
@@ -36,7 +31,7 @@ If you prefer [winget](https://learn.microsoft.com/en-us/windows/package-manager
3631
Here is the one-liner to install all tools:
3732

3833
```
39-
"Git.Git Kitware.CMake Ninja-build.Ninja Python.Python.3.11 RubyInstallerTeam.Ruby.3.1 ApacheFriends.Xampp.8.2 GnuWin32.Gperf" -split " " |% { winget install --scope=machine --id $_ }
34+
"Git.Git Kitware.CMake Ninja-build.Ninja Python.Python.3.11 RubyInstallerTeam.Ruby.3.1 ApacheFriends.Xampp.8.2 GnuWin32.Gperf LLVM.LLVM" -split " " |% { winget install --scope=machine --id $_ }
4035
```
4136

4237
If `--scope=machine` isn't specified, Python is installed under your user profile directory.
@@ -65,6 +60,9 @@ path %~dp0WebKitLibraries\win\bin64;%path%
6560
set WEBKIT_TESTFONTS=%~dp0Tools\WebKitTestRunner\fonts
6661
set DUMPRENDERTREE_TEMP=%TEMP%
6762
63+
set CC=clang-cl
64+
set CXX=clang-cl
65+
6866
rem set http_proxy=http://your-proxy:8080
6967
rem set https_proxy=%http_proxy%
7068
@@ -113,6 +111,9 @@ You can run programs under a debugger with [this instruction](../Build & Debug/D
113111

114112
### Building from within Visual Studio
115113

114+
You can use CMake Visual Studio generator instead of Ninja generator.
115+
Install [the LLVM extension](https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild) of MSBuild.
116+
116117
In the WinKit command prompt,
117118

118119
```
@@ -213,24 +214,3 @@ OK
213214
Due to the useless error message, this is a Windows port FAQ.
214215
The error message actually means MiniBrowserLib.dll can't load required DLL of WebKitRequirements.
215216
You have to set the env var WEBKIT_LIBRARIES. Or, copy all DLL of WebKitRequirements to the directory of MiniBrowser.exe as explained in the above section.
216-
217-
218-
## Compiling with Clang
219-
220-
[clang-cl has a problem for /MP support.](https://reviews.llvm.org/D52193)
221-
It's recommended to use Ninja with clang-cl.
222-
Install clang-cl and Ninja.
223-
224-
```
225-
choco install -y llvm ninja
226-
```
227-
228-
Open Visual Studio Command Prompt, and invoke the following commands.
229-
230-
```
231-
set CC=clang-cl
232-
set CXX=clang-cl
233-
perl Tools\Scripts\build-webkit --release --ninja
234-
```
235-
236-
clang-cl builds are experimental, see [Bug 171618](https://bugs.webkit.org/show_bug.cgi?id=171618) for the current status.

0 commit comments

Comments
 (0)