[CMake][Win] Forwarding headers of WTF and PAL are copied twice in Visual Studio builds Here is the full build log: https://gist.github.com/fujii/84acffa6bd648c8af5bbac5b01ed954f For example, DerivedSources/ForwardingHeaders/pal/system/Clock.h was copied twice in PALForwardingHeaders and PAL projects. > 7>------ Build started: Project: PALForwardingHeaders, Configuration: Release x64 ------ > 7>Generating ../../../../DerivedSources/ForwardingHeaders/pal/system/Clock.h > 23>------ Build started: Project: PAL, Configuration: Release x64 ------ > 23>Generating ../../../../DerivedSources/ForwardingHeaders/pal/system/Clock.h
Created attachment 334797 [details] Screenshot of Solution Explore Those header files reside in both projects.
I think we have two choices of solutions: * Use cmake -E copy_if_different * Copy in PAL target and Remove PALForwardingHeaders target
One more way: * Do not add those headers in WTF and PAL
Created attachment 334798 [details] WIP patch for solution #3
Created attachment 334799 [details] another WIP patch (In reply to Fujii Hironori from comment #2) > * Copy in PAL target and Remove PALForwardingHeaders target It turns out this approach doesn't work as expected. Because LLIntOffsetsExtractor needs forwarding header of JSC. So JavaScriptCore and JavaScriptCoreForwardingHeaders targets should be separate. I created another WIP patch of meta CMake approach.
(In reply to Fujii Hironori from comment #5) > Created attachment 334799 [details] > another WIP patch > > (In reply to Fujii Hironori from comment #2) > > * Copy in PAL target and Remove PALForwardingHeaders target > > It turns out this approach doesn't work as expected. > Because LLIntOffsetsExtractor needs forwarding header of JSC. > So JavaScriptCore and JavaScriptCoreForwardingHeaders targets should be > separate. > > I created another WIP patch of meta CMake approach. I'm trying to split the headers project into 2 in https://bugs.webkit.org/show_bug.cgi?id=183251 which would solve this issue. WIP solution #3 is the route I would go after this but I would keep with the naming ${framework}_PUBLIC_FRAMEWORK_HEADERS
Created attachment 335009 [details] Patch Patch renaming WTF_HEADERS to WTF_PUBLIC_FRAMEWORK_HEADERS and PAL_HEADERS to PAL_PUBLIC_FRAMEWORK_HEADERS. This stops the twice copying
Comment on attachment 335009 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335009&action=review > Source/WTF/wtf/CMakeLists.txt:1 > +set(WTF_PUBLIC_FRAMEWORK_HEADERS WTF_PUBLIC_HEADERS would be better IMO
Created attachment 335024 [details] Patch Updating based on review comments.
Where WTF_PUBLIC_HEADERS is used?
Comment on attachment 335024 [details] Patch Clearing flags on attachment: 335024 Committed r229572: <https://trac.webkit.org/changeset/229572>
All reviewed patches have been landed. Closing bug.
<rdar://problem/38402775>