[Win] WebCore.dir\Debug\WebCore.lib : fatal error LNK1248: image size (1000309F0) exceeds maximum allowable size (FFFFFFFF) WinCairo Debug fails to build with CMake Visual Studio generator. Ninja build has no problem. > perl .\Tools\Scripts\build-webkit --wincairo --debug --no-ninja > WebCore.dir\Debug\WebCore.lib : fatal error LNK1248: image size (1000309F0) exceeds maximum allowable size (FFFFFFFF) [C:\home\webkit\gb\WebKitBuild\Debug\Source\WebCore\WebCore.vcxproj]
I'm using Microsoft Visual Studio Professional 2019 Version 16.11.3.
I tried MSBuild+Clang-cl, and it can build with zillions of compilation warnings. 1. Install required components https://docs.microsoft.com/en-us/cpp/build/clang-support-msbuild 2. perl .\Tools\Scripts\build-webkit --wincairo --debug --no-ninja --cmakeargs="-T ClangCL"
I successfully built the latest AppleWin Debug (r283156) without Ninja on my PC. 😵 > perl .\Tools\Scripts\build-webkit --debug --no-ninja
<rdar://problem/83867090>
Removing /Zc:lambda siwtch (reverting r283007) can compile WinCairo Debug.
Same issue occurs with VS 2022 17.0 that was released today.
Bug 237617 seems to going to fix this issue. We should test WinCairo after it will land. Bug 237617 – Fix Windows debug build
I confirmed it solved this issue for WinCairo too. *** This bug has been marked as a duplicate of bug 237617 ***