Bug 121356

Summary: [GTK] WebKitGTK+ is linking against libxslt in too many places
Product: WebKit Reporter: Alberto Garcia <berto>
Component: WebKitGTKAssignee: Alberto Garcia <berto>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, cgarcia, commit-queue, gustavo, mrobinson, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review+

Description Alberto Garcia 2013-09-14 08:07:54 PDT
This is a follow-up to bug 119688.

We're linking against libxslt in too many places.

As far as I can see, libxslt is only used in a few files inside
WebCore ( Source/WebCore/xml/XSL*.cpp ) so:

 - LIBXSLT_CFLAGS is only needed for those files (listed in
   webcore_sources, defined in Source/WebCore/GNUmakefile.list.am).

 - LIBXSLT_LIBS is only needed in the libraries that include webcore,
   that is: libwebkitgtk, libwebkit2gtk and webkitpluginprocess.

We can remove LIBXSLT_CFLAGS from the following places, because they
don't include any of the source files that use libxslt:

 - libWebCorePlatform_la_CPPFLAGS
 - libWebCoreGtk_la_CPPFLAGS
 - libwebkitgtk_<version>_la_CPPFLAGS
 - libWebCoreGtk2_la_CPPFLAGS.

And we can remove LIBXSLT_LIBS from the following places, which don't
need to link against libxslt.

 - webkit_tests_ldadd
 - Programs_MiniBrowser_LDADD
 - Programs_TestWebKitAPI_TestWebCore_LDADD
 - Programs_WebKitTestRunner_LDADD
Comment 1 Alberto Garcia 2013-09-14 08:16:35 PDT
Created attachment 211647 [details]
Patch

Here's the patch, I built r155767 from scratch twice, release and debug builds, and everything seems to work fine.
Comment 2 Alberto Garcia 2013-09-14 08:18:43 PDT
I'm using the gold linker btw.
Comment 3 Martin Robinson 2013-09-14 08:50:56 PDT
Comment on attachment 211647 [details]
Patch

Thanks.
Comment 4 Alberto Garcia 2013-09-14 09:11:36 PDT
Committed r155768: <http://trac.webkit.org/changeset/155768>