Bug 322271

Summary: Windows Swift requires vcruntime modulemap override
Product: WebKit Reporter: adrian_taylor
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

adrian_taylor
Reported 2026-08-21 06:19:27 PDT
To get our Swift code working on Windows, we need to override the limited vcruntime modulemap provided as part of the Windows Swift SDK to make it a bit more complete. 1. The Swift SDK's vcruntime.modulemap wraps the MSVC STL in a clang module whose yvals_core.h lives in an explicit submodule, so the __cpp_lib_* feature-test macros never become visible to headers that reach <version> through a module import. WTF/simdutf then mix pre-C++20 and C++23 preprocessor paths. Seed the macros through the platform-swift-args.resp response file (generate-platform-args --stl-feature-macros); they must not go on the command line, which already sits near the 32767-char CreateProcess limit that ninja hits before swiftc-wrapper can expand its own response file. 2. The same modulemap names only two of the STL's __msvc_*.hpp internal headers, leaving e.g. std::views::transform (__msvc_ranges_to.hpp) invisible at use sites. Generate an amended modulemap listing all of them and mount it over the MSVC include dir with a VFS overlay. This problem has been reported upstream to the relevant Swift folks as rdar://185507163.
Attachments
adrian_taylor
Comment 1 2026-08-21 06:20:44 PDT
EWS
Comment 2 2026-08-26 02:13:44 PDT
Committed 319854@main (4e646d190c3f): <https://commits.webkit.org/319854@main> Reviewed commits have been landed. Closing PR #72124 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2026-08-26 02:14:13 PDT
Note You need to log in before you can comment on or make changes to this bug.