[Webkit-unassigned] [Bug 144557] [GTK] OSX linker doesn't understand --whole-archive

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 12 12:48:22 PDT 2015


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

--- Comment #5 from Philip Chimento <philip.chimento at gmail.com> ---
(In reply to comment #4)
> Comment on attachment 252688 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=252688&action=review
> 
> Seems sensible to me, but this patch needs a bit of work. Thanks!
> 
> > Source/WebKit2/PlatformGTK.cmake:549
> > -ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
> > +if (CMAKE_SYSTEM_NAME MATCHES "Linux")
> > +    ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
> > +endif ()
> 
> It would be better to add this check to the ADD_WHOLE_ARCHIVE_TO_LIBRARIES
> macro instead of requiring it for every invocation.

Sure. I'll also change it to NOT CMAKE_SYSTEM_MATCHES "Darwin" in order to be more specific like I did in #144555.

> > Source/WebKit2/PlatformGTK.cmake:875
> > -    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
> > +    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=-lGObjectDOMBindings
> 
> This looks unrelated.

These are related though; it's what I was referring to with "link with extra libraries instead" in the patch's changelog. Without --whole-archive, these libraries don't get picked up for linking, so I have to add them manually.

I wonder if it might make sense to get rid of the ADD_WHOLE_ARCHIVE_TO_LIBRARIES macro entirely, since all the necessary libraries are now added manually. Alternatively, I could bracket these manual additions inside CMAKE_SYSTEM_NAME checks.

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


More information about the webkit-unassigned mailing list