Summary: | [WinCairo] Build error with CMAKE_DISABLE_PRECOMPILE_HEADERS ON after 257057@main | ||
---|---|---|---|
Product: | WebKit | Reporter: | Diego Pino <dpino> |
Component: | New Bugs | Assignee: | Diego Pino <dpino> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | Hironori.Fujii, yurys |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Diego Pino
2022-12-05 18:43:01 PST
Feel free to propose a patch to fix the problem if you want. BTW, why do you want to disable pch? Pull request: https://github.com/webkit/webkit/pull/7185 (In reply to Fujii Hironori from comment #1) > Feel free to propose a patch to fix the problem if you want. > BTW, why do you want to disable pch? Since this change Playwright's Windows build stopped working. Build error is: ``` 57><PROGRAMFILES>\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\include\xpolymorphic_allocator.h(204,74): error C2059: syntax error: '(' (compiling source file C:\Users\<USERNAME>\webkit\Source\ThirdParty\libwebrtc\Source\third_party\libwebm\mkvmuxer\mkv 57><PROGRAMFILES>\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\include\xpolymorphic_allocator.h(287): message : see reference to class template instantiation 'std::pmr::polymorphic_allocator<_Ty>' being compiled (compiling source file C:\Users\<USERNAME 57>mkvmuxerutil.cc 57><PROGRAMFILES>\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\include\xpolymorphic_allocator.h(204,1): error C2238: unexpected token(s) preceding ';' (compiling source file C:\Users\<USERNAME>\webkit\Source\ThirdParty\libwebrtc\Source\third_party\libwe 57><PROGRAMFILES>\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\include\list(294,37): error C2059: syntax error: '(' (compiling source file C:\Users\<USERNAME>\webkit\Source\ThirdParty\libwebrtc\Source\third_party\libwebm\mkvmuxer\mkvmuxer.cc) ``` This build error is related to downstream changes in Playwright. To work around this build error I'm trying to disable precompile headers, hoping it will work like it was before this change. That's when I realized disabling precompile headers for Windows is failing upstream. I'm still experimenting, I don't know if managing to build with CMAKE_DISABLE_PRECOMPILE_HEADERS ON will solve the downstream build error. Still my gut feeling tells me a platform should build regardless this option is enabled or disabled. Maybe I'm ignoring something, idk. Pull request: https://github.com/WebKit/WebKit/pull/9107 I prefer Diego's approach fixing CMAKE_DISABLE_PRECOMPILE_HEADERS problems. Does it fail? This was fixed on our end downstream. After 257057@main every c++ file in WebKit target is forced to include WebKit2Prefix.h which overrides new and delete definitions. Normally, in WebKit those overrides are removed by config.h which is included in the very top of every *.cpp file. But in our downstream port we cut some corners and included files from Source/ThirdParty, they don't have such include and new/delete were still overridden so the compiler complained about new/delete not being defined with an obscure message. WinCairo build works now fine when building with `CMAKE_DISABLE_PRECOMPILE_HEADERS ON`. |