<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] OSX linker doesn't understand --whole-archive"
   href="https://bugs.webkit.org/show_bug.cgi?id=144557#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] OSX linker doesn't understand --whole-archive"
   href="https://bugs.webkit.org/show_bug.cgi?id=144557">bug 144557</a>
              from <span class="vcard"><a class="email" href="mailto:philip.chimento&#64;gmail.com" title="Philip Chimento &lt;philip.chimento&#64;gmail.com&gt;"> <span class="fn">Philip Chimento</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=144557#c4">comment #4</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=252688&amp;action=diff" name="attach_252688" title="Patch">attachment 252688</a> <a href="attachment.cgi?id=252688&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=252688&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=252688&amp;action=review</a>
&gt; 
&gt; Seems sensible to me, but this patch needs a bit of work. Thanks!
&gt; 
&gt; &gt; Source/WebKit2/PlatformGTK.cmake:549
&gt; &gt; -ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
&gt; &gt; +if (CMAKE_SYSTEM_NAME MATCHES &quot;Linux&quot;)
&gt; &gt; +    ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES)
&gt; &gt; +endif ()
&gt; 
&gt; It would be better to add this check to the ADD_WHOLE_ARCHIVE_TO_LIBRARIES
&gt; macro instead of requiring it for every invocation.</span >

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

<span class="quote">&gt; &gt; Source/WebKit2/PlatformGTK.cmake:875
&gt; &gt; -    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
&gt; &gt; +    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=-lGObjectDOMBindings
&gt; 
&gt; This looks unrelated.</span >

These are related though; it's what I was referring to with &quot;link with extra libraries instead&quot; 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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>