From dfc98a3faeb5bb627f57b423decc2c3c8f61c084 Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Tue, 5 Aug 2025 13:45:07 +0100 Subject: [PATCH 01/10] Update WindowsPort.md As per #129 --- docs/Ports/WindowsPort.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index db735175..aef1fe23 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -11,14 +11,16 @@ Install [the latest Visual Studio with "Desktop development with C++" workload]( build-webkit script creates a symlink to a generated compile_commands.json. Install CMake, Perl, Python, Ruby, gperf \([GnuWin32 Gperf](https://gnuwin32.sourceforge.net/packages/gperf.htm)\), LLVM, and Ninja. -Python 3.12 has [a problem for WebKit at the moment](https://webkit.org/b/261113). Use Python 3.11. +- Python 3.12 has [a problem for WebKit at the moment](https://webkit.org/b/261113). Use Python 3.11. +- Cmake 4+ has [a dowstream problem for vcpkg woff2 at the moment](https://github.com/WebKit/Documentation/issues/129). Use Cmake 3.31.8. You can use [Chocolatey](https://community.chocolatey.org/) to install the tools. [ActivePerl chocolatey package](https://community.chocolatey.org/packages/ActivePerl) has a problem and no package maintainer now. XAMPP includes Perl, and running layout tests needs XAMPP. Install XAMPP instead. ``` -choco install -y xampp-81 python311 ruby git cmake gperf llvm ninja +choco install -y xampp-81 python311 ruby git gperf llvm ninja +choco install -y cmake --version=3.31.8 ``` Install pywin32 Python module for run-webkit-tests and git-webkit. From aa4b6c7df69a83abd055a7f6330a7dc94cb3e4cb Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Tue, 12 Aug 2025 14:23:27 +0100 Subject: [PATCH 02/10] Update WindowsPort.md - Make users aware that shallow cloning of the WebKit repo will cause failure - Make users aware that "C++ Clang Tools for Windows" will cause build failure and offer workaround in the Webkit Command Prompt script. - Add option to set ccmake for pch in the Webkit Command Prompt --- docs/Ports/WindowsPort.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index aef1fe23..25741b8a 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -3,10 +3,15 @@ It is using [cairo](https://www.cairographics.org/) for the graphics backend, [libcurl](https://curl.se/libcurl/) for the network backend. It supports only 64 bit Windows. +## Cloning Webkit +A full clone of the [Webkit repository](https://github.com/WebKit/WebKit) is required. Shallow cloning will not work. + ## Installing Development Tools Install [the latest Visual Studio with "Desktop development with C++" workload](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation). +If you have *"C++ Clang Tools for Windows"* installed for the workload, this will take precedence and the build will fail. Explicitilty provide the full path to a alternative llvm `clang-cl.exe` in the Webkit Command Prompt script for this case. + [Activate Developer Mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development#activate-developer-mode). build-webkit script creates a symlink to a generated compile_commands.json. @@ -75,6 +80,8 @@ set DUMPRENDERTREE_TEMP=%TEMP% set CC=clang-cl set CXX=clang-cl +rem set CC=\clang-cl.exe +rem set CXX=\clang-cl.exe rem set http_proxy=http://your-proxy:8080 rem set https_proxy=%http_proxy% @@ -89,6 +96,9 @@ rem set JSC_useDOMJIT=0 rem You can show check TextureMapper FPS via WEBKIT_SHOW_FPS. rem set WEBKIT_SHOW_FPS=1 +rem You can use ccache with pre-compiled headers enabled +rem set CCACHE_SLOPPINESS=pch_defines,time_macros + call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat" cd %~dp0 start powershell From 23de9e02155abb0bc979186f15fa7db4a8b59e78 Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Wed, 13 Aug 2025 15:32:48 +0100 Subject: [PATCH 03/10] Update WindowsPort.md --- docs/Ports/WindowsPort.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index 25741b8a..a751cf8c 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -4,16 +4,17 @@ It is using [cairo](https://www.cairographics.org/) for the graphics backend, [l It supports only 64 bit Windows. ## Cloning Webkit -A full clone of the [Webkit repository](https://github.com/WebKit/WebKit) is required. Shallow cloning will not work. +Ensure that you are NOT cloning under an ancestor directory that is a git repository. This may confuse `build-webkit` script and result in failure.
+A shallow clone of the WebKit repository at a hash or tag may work if you are just building a release and not intending to develop WebKit. ## Installing Development Tools Install [the latest Visual Studio with "Desktop development with C++" workload](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation). -If you have *"C++ Clang Tools for Windows"* installed for the workload, this will take precedence and the build will fail. Explicitilty provide the full path to a alternative llvm `clang-cl.exe` in the Webkit Command Prompt script for this case. +If have included *C++ Clang Tools for Windows* for the workload, it's Llvm will take precedence and the build may fail. For this scenario, explicitilty provide the full path to an alternative Windows Llvm's `clang-cl.exe` in the Webkit Command Prompt script. [Activate Developer Mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development#activate-developer-mode). -build-webkit script creates a symlink to a generated compile_commands.json. +`build-webkit` script creates a symlink to a generated compile_commands.json. Install CMake, Perl, Python, Ruby, gperf \([GnuWin32 Gperf](https://gnuwin32.sourceforge.net/packages/gperf.htm)\), LLVM, and Ninja. - Python 3.12 has [a problem for WebKit at the moment](https://webkit.org/b/261113). Use Python 3.11. @@ -96,8 +97,8 @@ rem set JSC_useDOMJIT=0 rem You can show check TextureMapper FPS via WEBKIT_SHOW_FPS. rem set WEBKIT_SHOW_FPS=1 -rem You can use ccache with pre-compiled headers enabled -rem set CCACHE_SLOPPINESS=pch_defines,time_macros +rem You can use ccache with pre-compiled headers @see https://ccache.dev/manual/latest.html#_precompiled_headers +rem set CCACHE_SLOPPINESS=pch_defines,time_macros,include_file_mtime,include_file_ctime call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat" cd %~dp0 From 6beb1ae0d869762e7217a573a23f7538a7244fe1 Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Wed, 13 Aug 2025 16:19:55 +0100 Subject: [PATCH 04/10] Update WindowsPort.md --- docs/Ports/WindowsPort.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index a751cf8c..bdcbed85 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -5,7 +5,7 @@ It supports only 64 bit Windows. ## Cloning Webkit Ensure that you are NOT cloning under an ancestor directory that is a git repository. This may confuse `build-webkit` script and result in failure.
-A shallow clone of the WebKit repository at a hash or tag may work if you are just building a release and not intending to develop WebKit. +A shallow clone of the WebKit repository at a detached hash may work if you are just building and not intending to develop WebKit. Official Apple release tags are unlikely to work. ## Installing Development Tools From 617bab264fe44244258a1b89c2ff2badbce2732d Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Wed, 13 Aug 2025 18:36:24 +0100 Subject: [PATCH 05/10] Update WindowsPort.md --- docs/Ports/WindowsPort.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index bdcbed85..e65ccd84 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -17,27 +17,29 @@ If have included *C++ Clang Tools for Windows* for the workload, it's Llvm will `build-webkit` script creates a symlink to a generated compile_commands.json. Install CMake, Perl, Python, Ruby, gperf \([GnuWin32 Gperf](https://gnuwin32.sourceforge.net/packages/gperf.htm)\), LLVM, and Ninja. -- Python 3.12 has [a problem for WebKit at the moment](https://webkit.org/b/261113). Use Python 3.11. -- Cmake 4+ has [a dowstream problem for vcpkg woff2 at the moment](https://github.com/WebKit/Documentation/issues/129). Use Cmake 3.31.8. +- Python 3.12+ potentially has [a problem for WebKit in some contexts](https://webkit.org/b/261113). Use Python 3.11.x if you experience issues. +- Cmake 4+ has [a dowstream problem for vcpkg woff2 at the moment](https://github.com/WebKit/Documentation/issues/129). Use Cmake 3.x. You can use [Chocolatey](https://community.chocolatey.org/) to install the tools. [ActivePerl chocolatey package](https://community.chocolatey.org/packages/ActivePerl) has a problem and no package maintainer now. XAMPP includes Perl, and running layout tests needs XAMPP. Install XAMPP instead. -``` -choco install -y xampp-81 python311 ruby git gperf llvm ninja -choco install -y cmake --version=3.31.8 +```powershell +choco install -y xampp-81 python ruby git gperf llvm ninja +# Use the latest 3.x version of cmake available +choco search -e cmake -a +choco install -y cmake --version=3.??.? ``` Install pywin32 Python module for run-webkit-tests and git-webkit. -``` +```powershell python -m pip install pywin32 ``` 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). -``` +```powershell git config --global core.autocrlf input ``` From 17f78333ec251b45cc4f332a54cdbf98a6b25e09 Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Wed, 13 Aug 2025 18:39:44 +0100 Subject: [PATCH 06/10] Update WindowsPort.md --- docs/Ports/WindowsPort.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index e65ccd84..3051f4c1 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -28,7 +28,8 @@ XAMPP includes Perl, and running layout tests needs XAMPP. Install XAMPP instead choco install -y xampp-81 python ruby git gperf llvm ninja # Use the latest 3.x version of cmake available choco search -e cmake -a -choco install -y cmake --version=3.??.? +choco install -y cmake --version=3.x.x +choco pin add -n=cmake ``` Install pywin32 Python module for run-webkit-tests and git-webkit. From c413ea1a614b67cc1de647a0a5aee0dc260e8627 Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Wed, 13 Aug 2025 18:47:12 +0100 Subject: [PATCH 07/10] Update WindowsPort.md --- docs/Ports/WindowsPort.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index 3051f4c1..b1669a38 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -4,7 +4,7 @@ It is using [cairo](https://www.cairographics.org/) for the graphics backend, [l It supports only 64 bit Windows. ## Cloning Webkit -Ensure that you are NOT cloning under an ancestor directory that is a git repository. This may confuse `build-webkit` script and result in failure.
+Ensure that you are NOT cloning under an ancestor directory that is a git repository. This may confuse the `build-webkit` script and result in failure. A shallow clone of the WebKit repository at a detached hash may work if you are just building and not intending to develop WebKit. Official Apple release tags are unlikely to work. ## Installing Development Tools From f17aab2f7b1f6a404e92cd7489d98018eecdd5b1 Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Wed, 13 Aug 2025 23:32:28 +0100 Subject: [PATCH 08/10] Update WindowsPort.md --- docs/Ports/WindowsPort.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index b1669a38..57cf082d 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -18,7 +18,7 @@ If have included *C++ Clang Tools for Windows* for the workload, it's Llvm will Install CMake, Perl, Python, Ruby, gperf \([GnuWin32 Gperf](https://gnuwin32.sourceforge.net/packages/gperf.htm)\), LLVM, and Ninja. - Python 3.12+ potentially has [a problem for WebKit in some contexts](https://webkit.org/b/261113). Use Python 3.11.x if you experience issues. -- Cmake 4+ has [a dowstream problem for vcpkg woff2 at the moment](https://github.com/WebKit/Documentation/issues/129). Use Cmake 3.x. +- CMake 4+ has [a dowstream problem for vcpkg woff2 at the moment](https://github.com/WebKit/Documentation/issues/129). Use CMake 3.x. You can use [Chocolatey](https://community.chocolatey.org/) to install the tools. [ActivePerl chocolatey package](https://community.chocolatey.org/packages/ActivePerl) has a problem and no package maintainer now. @@ -26,7 +26,7 @@ XAMPP includes Perl, and running layout tests needs XAMPP. Install XAMPP instead ```powershell choco install -y xampp-81 python ruby git gperf llvm ninja -# Use the latest 3.x version of cmake available +# Use the latest 3.x version of CMake available choco search -e cmake -a choco install -y cmake --version=3.x.x choco pin add -n=cmake From 8a3f853f9b67c6033f5731a956dc4740537a8843 Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Wed, 13 Aug 2025 23:39:00 +0100 Subject: [PATCH 09/10] Update WindowsPort.md --- docs/Ports/WindowsPort.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index 57cf082d..712851bc 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -29,7 +29,7 @@ choco install -y xampp-81 python ruby git gperf llvm ninja # Use the latest 3.x version of CMake available choco search -e cmake -a choco install -y cmake --version=3.x.x -choco pin add -n=cmake +choco pin add --name="'cmake'" --version="'3.x.x'" --reason="'WebKit downstream issue building woff2 with vcpkg requires CMake < 4'" ``` Install pywin32 Python module for run-webkit-tests and git-webkit. From 4e61b146df618299454accd83dde9f3e2a6853bd Mon Sep 17 00:00:00 2001 From: Michael Jonker Date: Wed, 13 Aug 2025 23:41:12 +0100 Subject: [PATCH 10/10] Update WindowsPort.md --- docs/Ports/WindowsPort.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Ports/WindowsPort.md b/docs/Ports/WindowsPort.md index 712851bc..8f09f804 100644 --- a/docs/Ports/WindowsPort.md +++ b/docs/Ports/WindowsPort.md @@ -18,7 +18,7 @@ If have included *C++ Clang Tools for Windows* for the workload, it's Llvm will Install CMake, Perl, Python, Ruby, gperf \([GnuWin32 Gperf](https://gnuwin32.sourceforge.net/packages/gperf.htm)\), LLVM, and Ninja. - Python 3.12+ potentially has [a problem for WebKit in some contexts](https://webkit.org/b/261113). Use Python 3.11.x if you experience issues. -- CMake 4+ has [a dowstream problem for vcpkg woff2 at the moment](https://github.com/WebKit/Documentation/issues/129). Use CMake 3.x. +- CMake 4+ has [a downstream problem for vcpkg woff2 at the moment](https://github.com/WebKit/Documentation/issues/129). Use CMake 3.x. You can use [Chocolatey](https://community.chocolatey.org/) to install the tools. [ActivePerl chocolatey package](https://community.chocolatey.org/packages/ActivePerl) has a problem and no package maintainer now.