Skip to content

Conversation

@donny-dont
Copy link
Contributor

@donny-dont donny-dont commented Nov 8, 2024

32342c7

[CMake] Integrate vcpkg into Windows build
https://bugs.webkit.org/show_bug.cgi?id=282800

Reviewed by Ross Kirsling.

Use `vcpkg` to handle the third party requirements of the Windows WebKit build.
The requirements will be built locally within the build and no longer
distributed from WebKitForWindows/WebKitRequirements. While all port definitions
are in that repository a migration to the canonical vcpkg registry at
Microsoft/vcpkg will be prioritized.

Removes the code that would download prebuilt binaries to `WebKitLibraries/win`.

This change will be used to support additional libraries in the future.

* .gitignore:
* Source/cmake/OptionsJSCOnly.cmake:
* Source/cmake/OptionsWin.cmake:
* Tools/Scripts/build-webkit:
* Tools/Scripts/download-github-release.py: Removed.
* Tools/Scripts/update-webkit-win-libs.py:
* Tools/Scripts/webkitdirs.pm:
(shouldUseVcpkg):
(generateBuildSystemFromCMakeProject):
(vcpkgArgsFromFeatures):
(windowsLibrariesDir): Deleted.
* Tools/Scripts/webkitperl/BuildSubproject.pm:
* WebKitLibraries/triplets/x64-windows-webkit.cmake: Added.
* vcpkg-configuration.json: Added.
* vcpkg.json: Added.

Canonical link: https://commits.webkit.org/295042@main

9237033

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ❌ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
💥 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@donny-dont donny-dont self-assigned this Nov 8, 2024
@donny-dont donny-dont added the CMake Bugzilla component for CMake build system changes label Nov 8, 2024
@donny-dont
Copy link
Contributor Author

Needs to be rebased after #36365 lands

@donny-dont
Copy link
Contributor Author

To run create a directory to do the build in and invoke cmake directly replacing the path to your webkit checkout

cmake -DPORT="Win" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -G Ninja -DDEVELOPER_MODE=ON -DENABLE_EXPERIMENTAL_FEATURES=ON <path-to-WebKit-checkout>

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 8, 2024
@donny-dont donny-dont removed the merging-blocked Applied to prevent a change from being merged label Nov 8, 2024
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 596b342 to efba267 Compare November 8, 2024 18:37
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from efba267 to 88b6f96 Compare November 8, 2024 23:30
@donny-dont
Copy link
Contributor Author

Ok so this works locally but will require some changes to the bots to support it.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 9, 2024
@donny-dont donny-dont removed the merging-blocked Applied to prevent a change from being merged label Nov 9, 2024
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 88b6f96 to 085b077 Compare November 9, 2024 01:22
@donny-dont donny-dont marked this pull request as ready for review November 9, 2024 01:22
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 9, 2024
Copy link
Contributor

@fujii fujii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this approach.

  • Buildbot workers have to compile all required libraries. But, we have no enough VM resources.
  • It increases the built artifact size if all compiled DLL are copies to bin directory. (layout tests bots need built DLLs)

I think current WebKitRequirements64.zip approach is better.

@fujii
Copy link
Contributor

fujii commented Nov 11, 2024

I tried build-webkit --debug on my PC, and got an error.

[3632/6915] Linking CXX shared library bin\WebCore.dll
FAILED: bin/WebCore.dll lib/WebCore.lib
C:\Windows\system32\cmd.exe /C "cd . && C:\tools\cmake\bin\cmake.exe -E vs_link_dll --intdir=Source\WebCore\CMakeFiles\WebCore.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\LLVM\bin\lld-link.exe /nologo @CMakeFiles\WebCore.rsp  /out:bin\WebCore.dll /implib:lib\WebCore.lib /pdb:bin\WebCore.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  /DEBUG /OPT:NOICF /OPT:REF /INCREMENTAL:NO /DELAYLOAD:d3d9.dll /DELAYLOAD:dxva2.dll /DELAYLOAD:evr.dll /DELAYLOAD:mf.dll /DELAYLOAD:mfplat.dll && C:\Windows\system32\cmd.exe /C "cd /D C:\webkit\wb\WebKitBuild\Debug\Source\WebCore && "C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/vcpkg/scripts/buildsystems/msbuild/applocal.ps1" -targetBinary C:/webkit/wb/WebKitBuild/Debug/bin/WebCore.dll -installedDir C:/webkit/wb/WebKitBuild/Debug/vcpkg_installed/x64-windows/debug/bin -OutVariable out""
LINK: command "C:\PROGRA~1\LLVM\bin\lld-link.exe /nologo @CMakeFiles\WebCore.rsp /out:bin\WebCore.dll /implib:lib\WebCore.lib /pdb:bin\WebCore.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL /DEBUG /OPT:NOICF /OPT:REF /INCREMENTAL:NO /DELAYLOAD:d3d9.dll /DELAYLOAD:dxva2.dll /DELAYLOAD:evr.dll /DELAYLOAD:mf.dll /DELAYLOAD:mfplat.dll /MANIFEST:EMBED,ID=2" failed (exit code 1) with the following output:
lld-link: error: /failifmismatch: mismatch detected for '_ITERATOR_DEBUG_LEVEL':
>>> Source\WebCore\PAL\pal\CMakeFiles\PAL.dir\.\win\LoggingWin.cpp.obj has value 0
>>> woff2dec.lib(woff2_dec.cc.obj) has value 2
ninja: build stopped: subcommand failed.

@fujii
Copy link
Contributor

fujii commented Nov 11, 2024

  • How and when should buildbot workers wipe out %USERPROFILE%/AppData/Local/vcpkg directory?

@donny-dont donny-dont removed the merging-blocked Applied to prevent a change from being merged label Nov 13, 2024
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 085b077 to 89c7498 Compare November 13, 2024 00:13
@donny-dont
Copy link
Contributor Author

I tried build-webkit --debug on my PC, and got an error.

[3632/6915] Linking CXX shared library bin\WebCore.dll
FAILED: bin/WebCore.dll lib/WebCore.lib
C:\Windows\system32\cmd.exe /C "cd . && C:\tools\cmake\bin\cmake.exe -E vs_link_dll --intdir=Source\WebCore\CMakeFiles\WebCore.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\LLVM\bin\lld-link.exe /nologo @CMakeFiles\WebCore.rsp  /out:bin\WebCore.dll /implib:lib\WebCore.lib /pdb:bin\WebCore.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  /DEBUG /OPT:NOICF /OPT:REF /INCREMENTAL:NO /DELAYLOAD:d3d9.dll /DELAYLOAD:dxva2.dll /DELAYLOAD:evr.dll /DELAYLOAD:mf.dll /DELAYLOAD:mfplat.dll && C:\Windows\system32\cmd.exe /C "cd /D C:\webkit\wb\WebKitBuild\Debug\Source\WebCore && "C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/vcpkg/scripts/buildsystems/msbuild/applocal.ps1" -targetBinary C:/webkit/wb/WebKitBuild/Debug/bin/WebCore.dll -installedDir C:/webkit/wb/WebKitBuild/Debug/vcpkg_installed/x64-windows/debug/bin -OutVariable out""
LINK: command "C:\PROGRA~1\LLVM\bin\lld-link.exe /nologo @CMakeFiles\WebCore.rsp /out:bin\WebCore.dll /implib:lib\WebCore.lib /pdb:bin\WebCore.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL /DEBUG /OPT:NOICF /OPT:REF /INCREMENTAL:NO /DELAYLOAD:d3d9.dll /DELAYLOAD:dxva2.dll /DELAYLOAD:evr.dll /DELAYLOAD:mf.dll /DELAYLOAD:mfplat.dll /MANIFEST:EMBED,ID=2" failed (exit code 1) with the following output:
lld-link: error: /failifmismatch: mismatch detected for '_ITERATOR_DEBUG_LEVEL':
>>> Source\WebCore\PAL\pal\CMakeFiles\PAL.dir\.\win\LoggingWin.cpp.obj has value 0
>>> woff2dec.lib(woff2_dec.cc.obj) has value 2
ninja: build stopped: subcommand failed.

This is resolved now

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 13, 2024
Copy link
Contributor

@fujii fujii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you use GitHub packages binary cache?
https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

@donny-dont donny-dont removed the merging-blocked Applied to prevent a change from being merged label Nov 16, 2024
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 8d7ae1b to 616c811 Compare April 4, 2025 05:38
@donny-dont
Copy link
Contributor Author

Added the vcpkg binary caching as requested to WebKitForWindows/docker-webkit-dev#408

I ran it locally with the updated requirements and 👇 was pushed. The latest change updated ICU to 77.1.

icu-77

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 4, 2025
@donny-dont donny-dont removed the merging-blocked Applied to prevent a change from being merged label Apr 5, 2025
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 616c811 to 5e5416a Compare April 5, 2025 01:24
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 5, 2025
@donny-dont
Copy link
Contributor Author

Using GitHub Packages as a NuGet feed for vcpkg was verified in EWS.

The cache was populated in https://ews-build.webkit.org/#/builders/59/builds/49007 . As an example here's icu 👇

Installing 3/26 icu:x64-windows-webkit@77.1.0...
Building icu:x64-windows-webkit@77.1.0...
C:\BW\Win-Build-EWS\build\WebKitLibraries\triplets\x64-windows-webkit.cmake: info: loaded overlay triplet from here
C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\ea40f10ddf278b30180b541393a9045baebe740c: info: installing overlay port from here
Downloading https://github.com/unicode-org/icu/releases/download/release-77-1/icu4c-77_1-src.tgz -> icu4c-77_1-src.tgz
Successfully downloaded icu4c-77_1-src.tgz
-- Extracting source C:/vcpkg/downloads/icu4c-77_1-src.tgz
-- Applying patch C:/Users/ContainerAdministrator/AppData/Local/vcpkg/registries/git-trees/ea40f10ddf278b30180b541393a9045baebe740c/patches/0001-Add-CMake-platform.patch
-- Applying patch C:/Users/ContainerAdministrator/AppData/Local/vcpkg/registries/git-trees/ea40f10ddf278b30180b541393a9045baebe740c/patches/0002-Remove-install-suffix-on-Windows.patch
-- Using source at C:/vcpkg/buildtrees/icu/src/c-77_1-src-e4739f0a52.clean
-- Configuring x64-windows-webkit
-- Building x64-windows-webkit-dbg
-- Building x64-windows-webkit-rel
Downloading msys2-mingw-w64-x86_64-pkgconf-1~2.3.0-1-any.pkg.tar.zst, trying https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-pkgconf-1~2.3.0-1-any.pkg.tar.zst
Successfully downloaded msys2-mingw-w64-x86_64-pkgconf-1~2.3.0-1-any.pkg.tar.zst
Downloading msys2-msys2-runtime-3.5.4-2-x86_64.pkg.tar.zst, trying https://mirror.msys2.org/msys/x86_64/msys2-runtime-3.5.4-2-x86_64.pkg.tar.zst
Successfully downloaded msys2-msys2-runtime-3.5.4-2-x86_64.pkg.tar.zst
-- Using msys root at C:/vcpkg/downloads/tools/msys2/21caed2f81ec917b
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/lib/pkgconfig
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/lib/pkgconfig/icu-i18n.pc
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/lib/pkgconfig/icu-io.pc
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/lib/pkgconfig/icu-uc.pc
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/debug/lib/pkgconfig
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/debug/lib/pkgconfig/icu-i18n.pc
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/debug/lib/pkgconfig/icu-io.pc
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/debug/lib/pkgconfig/icu-uc.pc
-- Installing: C:/vcpkg/packages/icu_x64-windows-webkit/share/icu/copyright
-- Performing post-build validation
Starting submission of icu:x64-windows-webkit@77.1.0 to 1 binary cache(s) in the background
Elapsed time to handle icu:x64-windows-webkit: 2.8 min
icu:x64-windows-webkit package ABI: 94d1add935157941e2392ad56e7246e188e78065d71b85fecdd32b70fbeffa8a

The hash from ☝️ is represented in the package listing 👇 .

image

The next build then restored from cache on a different bot because the build environment hash was the same. (this is why the counter is 1 for ☝️). See https://ews-build.webkit.org/#/builders/59/builds/49018 for the complete build.

The following packages will be built and installed:
    brotli:x64-windows-webkit@1.1.0#1 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\4e5b5ae1ad26c80535c893cc0307121f0398549e
    cairo:x64-windows-webkit@1.18.2 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\d66ade1c9bb9ec902032fad20ac0d975208fedb4
    curl[core,http3,ipv6,libressl]:x64-windows-webkit@8.13.0 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\cc5115020dc054ffead1ff27fb41a39b9ef9c31b
  * highway:x64-windows-webkit@1.2.0 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\6084fa0969d208dd78997f44e8b4b406aa174345
    icu:x64-windows-webkit@77.1.0 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\ea40f10ddf278b30180b541393a9045baebe740c
    lcms:x64-windows-webkit@2.16 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\781f8c60a57e793ac8b9800b3b7cfa6e46f75b44
    libjpeg-turbo:x64-windows-webkit@3.1.0#1 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\6180688844449e5724d6dc8eb49ab90124438ce2
    libjxl:x64-windows-webkit@0.11.1 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\1b18a67135031ccaa38f55a3f8c0a2dff6082754
    libpng:x64-windows-webkit@1.6.46 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\0074ace75112e0a4ff3465de21e692c07d6e6b5f
    libpsl[core,libicu]:x64-windows-webkit@0.21.5#1 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\1f1ba362bcb9a330a5882ff668eb7fc3a2c2b6c3
    libressl:x64-windows-webkit@4.0.0#1 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\becbc2d569c392b3f2d60027db3797b51839c53a
    libwebp[core,libwebpmux,nearlossless,simd,unicode]:x64-windows-webkit@1.5.0 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\785bb5f8a86b4f67c4186cdb2c7ee09d344dcfff
    libxml2[core,icu]:x64-windows-webkit@2.13.5#2 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\90c8aae598f04d95b887f5bfd29e24ab1308bbfa
    libxslt[core,profiler,thread]:x64-windows-webkit@1.1.42#2 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\00e5829fca614f1b82dc9fa5439ef0a8d35d7cb4
    nghttp2:x64-windows-webkit@1.65.0 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\1c6c0f58fa40de3a567e40bcf361c6d448d5f7fb
    nghttp3:x64-windows-webkit@1.8.0 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\e2baa2babbe24c2c68c68e1dc8f66cc5f6550415
    ngtcp2[core,libressl]:x64-windows-webkit@1.11.0 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\aa28f3bb1e6ff83a034c6126468849699412a355
  * pixman:x64-windows-webkit@0.44.2 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\39c74ae3b4a9b82eb48d08a5c80ddb171817c03c
    sqlite3[core,fts3,json1,rtree]:x64-windows-webkit@3.49.1 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\92c7e25e29daa51849b0f0b82bae84898ebb80d9
  * vcpkg-cmake:x64-windows@2024-04-23 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\e74aa1e8f93278a8e71372f1fa08c3df420eb840
  * vcpkg-cmake-config:x64-windows@2024-05-23 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\97a63e4bc1a17422ffe4eff71da53b4b561a7841
  * vcpkg-cmake-get-vars:x64-windows@2024-09-22 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\f23148add155147f3d95ae622d3b0031beb25acf
  * vcpkg-tool-meson:x64-windows@1.6.1 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\dc948c67d7f1359319f801078422e996b0a89fd0
    woff2:x64-windows-webkit@1.0.2#4 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\fbd2207ad0ad1e7e52b421b86f96deff9ed7ec65
    zlib:x64-windows-webkit@zlib-ng -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\b7e95e97d224d1a520ec9d5246f76c1e52bb4c8c
  * zlib-ng:x64-windows-webkit@2.2.3#1 -- C:\Users\ContainerAdministrator\AppData\Local\vcpkg\registries\git-trees\8282d357a50be706405e9aed44a79a333a8e8af1
Additional packages (*) will be modified to complete this operation.
Restored 26 package(s) from NuGet in 13 s. Use --debug to see more details.

So a restore only took 13s. This seems more efficient than the WebKitRequirements.zip.

Overall this is ready to go. The request for binary caching has been done for all bots using Docker. A bot provided by Playwright folks is not using Docker, ews-004, and does not have vcpkg installed. I believe this is due to Visual Studio 2022 build tools which does not package vcpkg. Using the Docker images there or adding in vcpkg like the Docker images is the only thing that needs to be done to land this patch.

@mxschmitt
Copy link
Contributor

We as Playwright have tried this patch and it works well for us (builds successfully and works). It simplifies rolling of dependencies, seems to solve pinning and allows vcpkg caching strategies to get used. Thanks Don for the work and we're excited to get this landed and remove our local vcpkg hacks.

@fujii
Copy link
Contributor

fujii commented Apr 8, 2025

debug builds still have a problem https://bugs.webkit.org/show_bug.cgi?id=287815

@rkirsling
Copy link
Member

rkirsling commented Apr 17, 2025

Given that the error in the linked bug literally says Fatal because this is a curl debug build, it certainly seems reasonable that these cases be marked as debug failures in a test gardening patch—is there any reason to view these as a blocker for merging this PR?

(It's surprising for this to be raised as an issue prior to landing, given that Windows tests are not run via EWS.)

@fujii
Copy link
Contributor

fujii commented Apr 17, 2025

I know it's not a problem for you. You don't maintain Windows WebKit. You don't fix problems for Windows WebKit.
Please adopt vcpkg manifest mode to PlayStation port beforehand. I'm confident it will cause trouble. If it is really nice, I will change my mind.

@donny-dont
Copy link
Contributor Author

Given the needs of the community shipping the Windows port I am confident this solves all the issues with WebKitRequirements.zip. Their concerns with the status quo are valid and need to be prioritized.

This patch has already identified issues in the codebase that weren’t caught because the release crt was used. Using fully debug libraries might identify more issues.

Hypotheticals aren’t a reason to block this patch and not landing this patch is making the windows port less secure.

@donny-dont donny-dont removed the merging-blocked Applied to prevent a change from being merged label Apr 25, 2025
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 5e5416a to 9853c43 Compare April 25, 2025 18:21
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 9853c43 to 419c15e Compare May 12, 2025 19:10
@donny-dont donny-dont force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 419c15e to 9237033 Compare May 13, 2025 22:37
@donny-dont donny-dont added the merge-queue Applied to send a pull request to merge-queue label May 16, 2025
https://bugs.webkit.org/show_bug.cgi?id=282800

Reviewed by Ross Kirsling.

Use `vcpkg` to handle the third party requirements of the Windows WebKit build.
The requirements will be built locally within the build and no longer
distributed from WebKitForWindows/WebKitRequirements. While all port definitions
are in that repository a migration to the canonical vcpkg registry at
Microsoft/vcpkg will be prioritized.

Removes the code that would download prebuilt binaries to `WebKitLibraries/win`.

This change will be used to support additional libraries in the future.

* .gitignore:
* Source/cmake/OptionsJSCOnly.cmake:
* Source/cmake/OptionsWin.cmake:
* Tools/Scripts/build-webkit:
* Tools/Scripts/download-github-release.py: Removed.
* Tools/Scripts/update-webkit-win-libs.py:
* Tools/Scripts/webkitdirs.pm:
(shouldUseVcpkg):
(generateBuildSystemFromCMakeProject):
(vcpkgArgsFromFeatures):
(windowsLibrariesDir): Deleted.
* Tools/Scripts/webkitperl/BuildSubproject.pm:
* WebKitLibraries/triplets/x64-windows-webkit.cmake: Added.
* vcpkg-configuration.json: Added.
* vcpkg.json: Added.

Canonical link: https://commits.webkit.org/295042@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/CMake-Integrate-vcpkg-into-Windows-build branch from 9237033 to 32342c7 Compare May 16, 2025 23:41
@webkit-commit-queue
Copy link
Collaborator

Committed 295042@main (32342c7): https://commits.webkit.org/295042@main

Reviewed commits have been landed. Closing PR #36366 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 32342c7 into WebKit:main May 16, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake Bugzilla component for CMake build system changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants