[Webkit-unassigned] [Bug 182757] [CMake][Ninja] Fails to compile TestWebCore due to missing WebCore's derived headers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 17 14:13:33 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=182757

--- Comment #12 from Don Olmstead <don.olmstead at sony.com> ---
(In reply to Konstantin Tokarev from comment #11)
> Comment on attachment 334072 [details]
> WIP Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=334072&action=review
> 
> >> Source/JavaScriptCore/CMakeLists.txt:15
> >> +    "${CMAKE_BINARY_DIR}/JavaScriptCore.framework/PrivateHeaders"
> > 
> > This follows along with how Apple builds operate.
> > 
> > Stuff in PrivateHeaders does a #include <JavaScriptCore/Foo.h> so this would likely catch any compile errors. Also LLInt needs these headers installed.
> 
> I don't think it makes any sense to copy layout of macOS framework when
> there is no actual framework built.
> 
> Unless we are 100% sure that we don't want to use built-in cmake's support
> for frameworks on macOS, and even then having .framework on other platforms
> may be confusing

Eventually I would move this particular function into WEBKIT_FRAMEWORK so then it would enumerate the headers the CMake way for Cocoa frameworks. For the other ones it would just emulate the behavior.

> 
> >> Source/cmake/WebKitMacros.cmake:265
> >> +            add_custom_command(TARGET ${framework} PRE_LINK
> > 
> > So this moves the DerivedSources to being copied within the original ${framework} as a PRE_LINK step which happens before a POST_BUILD. Seems like a safe bet that things are going to be ok at this point.
> > 
> > I need to see how things work with WebCore to really determine if this will work across the board.
> > 
> > It seems to not cause rebuilds within Visual Studio so I think it solves things. Placing them within PrivateFrameworkHeaders causes the rebuilds in visual studio.
> 
> Did you check with Ninja generator? In general it's better to stay away from
> PRE_LINK, POST_BUILD etc., these things don't have well-defined behavior
> outside of Visual Studio generator

According to the docs https://cmake.org/cmake/help/v3.11/command/add_custom_command.html#build-events its PRE_BUILD that is Visual Studio only. It makes it sound like PRE_LINK and POST_BUILD are ok to use on any generator.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180217/ecaeb6a5/attachment.html>


More information about the webkit-unassigned mailing list