Bug 180921

Summary: [Win][CMake] Use add_custom_command to copy each forwarding header files
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: New BugsAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, annulen, bfulgham, commit-queue, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP patch
none
WIP patch
none
Patch
none
Patch
none
Patch none

Fujii Hironori
Reported 2017-12-17 18:06:59 PST
My previous patch (Bug 180521) doesn't solve the issue perfectly. Another incremental build failure happens. https://build.webkit.org/builders/WinCairo%2064-Bit%20Release/builds/9336
Attachments
WIP patch (8.02 KB, patch)
2017-12-19 18:33 PST, Fujii Hironori
no flags
WIP patch (9.15 KB, patch)
2017-12-19 22:48 PST, Fujii Hironori
no flags
Patch (12.63 KB, patch)
2017-12-20 19:04 PST, Fujii Hironori
no flags
Patch (15.87 KB, patch)
2017-12-21 20:26 PST, Fujii Hironori
no flags
Patch (15.86 KB, patch)
2017-12-21 21:57 PST, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2017-12-17 18:08:24 PST
WTF forwarding headers are generated by using WTF_PRE_BUILD_COMMAND in Source/WTF/wtf/PlatformWin.cmake. But, BYPRODUCTS of add_custom_target is not specified. <https://cmake.org/cmake/help/v3.10/command/add_custom_target.html> So, Ninja doesn't know the forwarding headers are generated.
Konstantin Tokarev
Comment 2 2017-12-18 01:50:29 PST
Make sure that cmake property GENERATED is enabled for generates files
Fujii Hironori
Comment 3 2017-12-18 18:27:43 PST
Just setting GENERATED source file property isn't enough in this case. Ninja have to know which command generates the dependent files.
Fujii Hironori
Comment 4 2017-12-19 18:33:28 PST
Created attachment 329868 [details] WIP patch
Fujii Hironori
Comment 5 2017-12-19 22:48:12 PST
Created attachment 329899 [details] WIP patch
Fujii Hironori
Comment 6 2017-12-20 01:32:13 PST
Unfortunately, this WIP patch doen't work as expected. Modifying WTF header doesn't trigger the recompilation of TestWTF. I guess this is caused by case insensitive file system. Condition.cpp.obj of TestWTF depends on ForwardingHeaders/wtf/Condition.h. > C:\webkit\ga\WebKitBuild\Debug>ninja -t deps Tools\TestWebKitAPI\CMakeFiles\TestWTFLib.dir\Tests\WTF\Condition.cpp.obj > (...) > DerivedSources/ForwardingHeaders/wtf/Condition.h > (...) It's a lowercase wtf. But, actual build rule is uppercase WTF. > C:\webkit\ga\WebKitBuild\Debug>ninja -t query DerivedSources/ForwardingHeaders/WTF/Condition.h > DerivedSources/ForwardingHeaders/WTF/Condition.h: > input: CUSTOM_COMMAND > ../../Source/WTF/wtf/Condition.h > outputs: > cmake_object_order_depends_target_WTF > Source/WTF/wtf/WTFForwardingHeaders > Source/WTF/wtf/CMakeFiles/WTFForwardingHeaders
Fujii Hironori
Comment 7 2017-12-20 02:24:30 PST
I've confirmed my speculation is right. I'll fix it beforehand in Bug 181022.
Fujii Hironori
Comment 8 2017-12-20 19:04:48 PST
Fujii Hironori
Comment 9 2017-12-21 20:26:02 PST
Fujii Hironori
Comment 10 2017-12-21 21:57:32 PST
Brent Fulgham
Comment 11 2017-12-28 13:46:25 PST
Comment on attachment 330109 [details] Patch r=me
WebKit Commit Bot
Comment 12 2017-12-28 14:06:39 PST
Comment on attachment 330109 [details] Patch Clearing flags on attachment: 330109 Committed r226306: <https://trac.webkit.org/changeset/226306>
WebKit Commit Bot
Comment 13 2017-12-28 14:06:40 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 14 2018-01-02 12:58:28 PST
Fujii Hironori
Comment 15 2018-01-05 02:41:13 PST
REGRESSION: Bug 181324
Note You need to log in before you can comment on or make changes to this bug.