I'm finding that the generated sources steps, such as the IDL generation, will rerun fully when making local modifications to source code. This is when building Visual Studio projects but might be more prevalent. I believe Chrome has separate projects for the generated sources steps so this might be the best way to go.
Created attachment 273238 [details] VS Log of WebCore rebuilding some derived sources Here is a verbose log from Visual Studio when changing a single file in the WebCore project. In this case its Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
Created attachment 273239 [details] VS Log of WebCore not rebuilding derived sources Here are the Visual Studio logs after attempting another build on the WebCore project after a completed build
Here's some more information on what I'm seeing. So in this case I'm building WinCairo in Visual Studio 2015. To start I generate the project files using the following command. perl Tools\Scripts build-webkit --wincairo --no-ninja --64-bit From there I built the WebCore project explicitly by right clicking on it and selecting Build. If I build it again it does not rebuild. However if I add a printf to a random file within the WebCore project it will start rebuilding some generated sources that don't seem to have any bearing on this. Specifically I've been able to reproduce by modifying Source/WebCore/platform/win/LanguageWin.cpp, Source/WebCore/platform/graphics/FloatPoint.cpp, Source/WebCore/bindings/js/IDBBindingUtilities.cpp and Source/WebCore/platform/graphics/egl/GLContextEGL.cpp. When modifying any of those three files the output looks like this when its not verbose. 1>------ Build started: Project: _WTF_PreBuild, Configuration: Debug x64 ------ 2>------ Build started: Project: _JavaScriptCore_PreBuild, Configuration: Debug x64 ------ 3>------ Build started: Project: stageSharedScripts, Configuration: Debug x64 ------ 4>------ Build started: Project: _WebCore_PreBuild, Configuration: Debug x64 ------ 5>------ Build started: Project: WebCore (WebCore\WebCore), Configuration: Debug x64 ------ 5> Generating ../../DerivedSources/WebCore/FetchHeadersBuiltins.cpp, ../../DerivedSources/WebCore/FetchHeadersBuiltins.h 5> Generating ../../DerivedSources/WebCore/FetchResponseBuiltins.cpp, ../../DerivedSources/WebCore/FetchResponseBuiltins.h 5> Generating ../../DerivedSources/WebCore/MediaDevicesBuiltins.cpp, ../../DerivedSources/WebCore/MediaDevicesBuiltins.h 5> Generating ../../DerivedSources/WebCore/NavigatorUserMediaBuiltins.cpp, ../../DerivedSources/WebCore/NavigatorUserMediaBuiltins.h 5> Generating ../../DerivedSources/WebCore/RTCPeerConnectionBuiltins.cpp, ../../DerivedSources/WebCore/RTCPeerConnectionBuiltins.h 5> Generating ../../DerivedSources/WebCore/RTCPeerConnectionInternalsBuiltins.cpp, ../../DerivedSources/WebCore/RTCPeerConnectionInternalsBuiltins.h 5> Generating ../../DerivedSources/WebCore/ByteLengthQueuingStrategyBuiltins.cpp, ../../DerivedSources/WebCore/ByteLengthQueuingStrategyBuiltins.h 5> Generating ../../DerivedSources/WebCore/CountQueuingStrategyBuiltins.cpp, ../../DerivedSources/WebCore/CountQueuingStrategyBuiltins.h 5> Generating ../../DerivedSources/WebCore/ReadableStreamBuiltins.cpp, ../../DerivedSources/WebCore/ReadableStreamBuiltins.h 5> Generating ../../DerivedSources/WebCore/ReadableStreamControllerBuiltins.cpp, ../../DerivedSources/WebCore/ReadableStreamControllerBuiltins.h 5> Generating ../../DerivedSources/WebCore/ReadableStreamInternalsBuiltins.cpp, ../../DerivedSources/WebCore/ReadableStreamInternalsBuiltins.h 5> Generating ../../DerivedSources/WebCore/ReadableStreamReaderBuiltins.cpp, ../../DerivedSources/WebCore/ReadableStreamReaderBuiltins.h 5> Generating ../../DerivedSources/WebCore/StreamInternalsBuiltins.cpp, ../../DerivedSources/WebCore/StreamInternalsBuiltins.h 5> Generating ../../DerivedSources/WebCore/WritableStreamBuiltins.cpp, ../../DerivedSources/WebCore/WritableStreamBuiltins.h 5> Generating ../../DerivedSources/WebCore/WritableStreamInternalsBuiltins.cpp, ../../DerivedSources/WebCore/WritableStreamInternalsBuiltins.h 5> GLContextEGL.cpp Searching around for those files they all appear in WebCoreJSBuiltins.cpp. In CMake this seems to correspond with line 3729 of Source/WebCore/CMakeLists.txt. ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/bindings/js/WebCoreJSBuiltins.cpp ${_objectName}Builtins.cpp) Overall I think the issue is that there are some dependencies being expressed in CMake that are not necessarily true which is causing a lot of regeneration when there are changes.
I solved this problem in Bug 163774. *** This bug has been marked as a duplicate of bug 163774 ***