RESOLVED DUPLICATE of bug 163774 155872
[Win] CMake seems to build all generated files every time
https://bugs.webkit.org/show_bug.cgi?id=155872
Summary [Win] CMake seems to build all generated files every time
Brent Fulgham
Reported 2016-03-24 22:32:48 PDT
It seems like the CMake-based build causes the IDL files to be processed in full every build. This is super annoying, especially since this has become a single-threaded bottleneck during the build.
Attachments
Patch (2.66 KB, patch)
2016-03-25 14:14 PDT, Brent Fulgham
no flags
Patch (2.14 KB, patch)
2016-03-25 16:26 PDT, Brent Fulgham
no flags
Patch (2.17 KB, patch)
2016-03-25 17:40 PDT, Brent Fulgham
achristensen: review+
Brent Fulgham
Comment 1 2016-03-24 22:42:43 PDT
The bottleneck seems to be that Visual Studio waits for each invocation of the "Custom Build Step" to complete: setlocal cd C:\Projects\WebKit\OpenSource\Source\WebCore if %errorlevel% neq 0 goto :cmEnd C: if %errorlevel% neq 0 goto :cmEnd C:\cygwin\bin\perl.exe -IC:/Projects/WebKit/OpenSource/Source/WebCore/bindings/scripts C:/Projects/WebKit/OpenSource/Source/WebCore/bindings/scripts/generate-bindings.pl --defines "LANGUAGE_JAVASCRIPT=1 " ... endless stuff if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd
Brent Fulgham
Comment 2 2016-03-24 22:43:41 PDT
I wonder what would happen if we did a "CALL" on the Perl program to run in a new process. We would lose the ability to end the build on an error in the script generation, but that doesn't really happen much anymore.
Brent Fulgham
Comment 3 2016-03-24 22:52:58 PDT
We probably need some way to sync that the auto-generating is done before compiling stuff that depends on it.
Don Olmstead
Comment 4 2016-03-25 10:18:50 PDT
One thought was maybe derived sources should be split into their own projects. https://bugs.webkit.org/show_bug.cgi?id=151399 had some initial work on this but didn't land. And here's a related bug you might want to roll into this https://bugs.webkit.org/show_bug.cgi?id=154938 that I opened.
Brent Fulgham
Comment 5 2016-03-25 14:14:02 PDT
Brent Fulgham
Comment 6 2016-03-25 14:53:03 PDT
Blah. Well, that didn't work.
Alexey Proskuryakov
Comment 7 2016-03-25 15:05:06 PDT
Comment on attachment 274940 [details] Patch CMake Error at Source/WebCore/CMakeLists.txt:3832 (add_library): Cannot find source file: C:/cygwin/home/buildbot/WebKit/WebKitBuild/Release/DerivedSources/WebCore/JSInternalSettings.cpp
Brent Fulgham
Comment 8 2016-03-25 16:26:20 PDT
Brent Fulgham
Comment 9 2016-03-25 17:40:48 PDT
Alex Christensen
Comment 10 2016-03-28 09:47:57 PDT
Comment on attachment 274961 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=274961&action=review > Source/cmake/WebKitMacros.cmake:96 > + set(_custom_outputs "${_destination}/${_prefix}${_name}.${_extension}" "${_destination}/${_prefix}${_name}.h") > + if (MSVC) > + set(_custom_outputs "${_destination}/${_prefix}${_name}.h") > + endif () if else endif
Brent Fulgham
Comment 11 2016-03-29 08:42:43 PDT
WebKit Commit Bot
Comment 12 2016-03-29 13:34:42 PDT
Re-opened since this is blocked by bug 155986
Fujii Hironori
Comment 13 2016-10-06 23:28:09 PDT
My patch in Bug 161433 Comment 9 mitigates this problem because: 1) It solves the problem editting one IDL triggers regenerating all bindings 2) It runs generate-bindings.pl parallel But, not perfectly fixed. I'll fix this issue after finishing Bug 161433.
Fujii Hironori
Comment 14 2016-10-30 19:10:19 PDT
I solved this problem in Bug 163774. *** This bug has been marked as a duplicate of bug 163774 ***
Note You need to log in before you can comment on or make changes to this bug.