Title: [252086] trunk
Revision
252086
Author
hironori.fu...@sony.com
Date
2019-11-05 14:57:46 -0800 (Tue, 05 Nov 2019)

Log Message

.:
[Win][CMake] Build WebCore as an OBJECT library for WinCairo port
https://bugs.webkit.org/show_bug.cgi?id=203663

Reviewed by Ross Kirsling.

WebCore is using __declspec(dllexport) to export symbols, but it
is built as a static library rather than a DLL. If any symbols in
an object file aren't referenced from WebKit.dll, they won't be
included in WebKit.dll.

This issue can be solved either by using OBJECT library for
WebCore or using /WHOLEARCHIVE:WebCore.lib for WebKit.

This change takes OBJECT library approach becuase it doesn't
generate unnecessary static libs (WebCore.lib) and it's already
used for non-unified source builds for the library size issue (Bug
196866 Comment 4).

However, AppleWin can't use it because the Apple internal builds
need to generate the static libs and OBJECT library doesn't work
well with makesafeseh.obj.

* Source/cmake/OptionsWin.cmake: Removed code overriding library types.
* Source/cmake/OptionsWinCairo.cmake: Use OBJECT library types for WebCore and WebCoreTestSupport.

Source/WebCore:
[Win][CMake] Build WebCore as an OBJECT library unless Apple internal builds
https://bugs.webkit.org/show_bug.cgi?id=203663

Reviewed by Ross Kirsling.

No behavioral changes.

* CMakeLists.txt: Changed WebCoreTestSupport not to link with
WebCore for Windows. Because WebKit.dll exports WebCore symbols,
they will be duplicated with WebCore.

Modified Paths

Diff

Modified: trunk/ChangeLog (252085 => 252086)


--- trunk/ChangeLog	2019-11-05 22:53:54 UTC (rev 252085)
+++ trunk/ChangeLog	2019-11-05 22:57:46 UTC (rev 252086)
@@ -1,3 +1,30 @@
+2019-11-05  Fujii Hironori  <hironori.fu...@sony.com>
+
+        [Win][CMake] Build WebCore as an OBJECT library for WinCairo port
+        https://bugs.webkit.org/show_bug.cgi?id=203663
+
+        Reviewed by Ross Kirsling.
+
+        WebCore is using __declspec(dllexport) to export symbols, but it
+        is built as a static library rather than a DLL. If any symbols in
+        an object file aren't referenced from WebKit.dll, they won't be
+        included in WebKit.dll.
+
+        This issue can be solved either by using OBJECT library for
+        WebCore or using /WHOLEARCHIVE:WebCore.lib for WebKit.
+
+        This change takes OBJECT library approach becuase it doesn't
+        generate unnecessary static libs (WebCore.lib) and it's already
+        used for non-unified source builds for the library size issue (Bug
+        196866 Comment 4).
+
+        However, AppleWin can't use it because the Apple internal builds
+        need to generate the static libs and OBJECT library doesn't work
+        well with makesafeseh.obj.
+
+        * Source/cmake/OptionsWin.cmake: Removed code overriding library types.
+        * Source/cmake/OptionsWinCairo.cmake: Use OBJECT library types for WebCore and WebCoreTestSupport.
+
 2019-11-02  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Add diagnostic logging for frontend feature usage

Modified: trunk/Source/WebCore/CMakeLists.txt (252085 => 252086)


--- trunk/Source/WebCore/CMakeLists.txt	2019-11-05 22:53:54 UTC (rev 252085)
+++ trunk/Source/WebCore/CMakeLists.txt	2019-11-05 22:57:46 UTC (rev 252086)
@@ -1230,9 +1230,11 @@
 )
 
 set(WebCoreTestSupport_LIBRARIES
-    WebCore
     WebKit::_javascript_Core
 )
+if (NOT WTF_OS_WINDOWS)
+    list(APPEND WebCoreTestSupport_LIBRARIES WebCore)
+endif ()
 
 if (ENABLE_LEGACY_ENCRYPTED_MEDIA)
     list(APPEND WebCore_SOURCES

Modified: trunk/Source/WebCore/ChangeLog (252085 => 252086)


--- trunk/Source/WebCore/ChangeLog	2019-11-05 22:53:54 UTC (rev 252085)
+++ trunk/Source/WebCore/ChangeLog	2019-11-05 22:57:46 UTC (rev 252086)
@@ -1,3 +1,16 @@
+2019-11-05  Fujii Hironori  <hironori.fu...@sony.com>
+
+        [Win][CMake] Build WebCore as an OBJECT library unless Apple internal builds
+        https://bugs.webkit.org/show_bug.cgi?id=203663
+
+        Reviewed by Ross Kirsling.
+
+        No behavioral changes.
+
+        * CMakeLists.txt: Changed WebCoreTestSupport not to link with
+        WebCore for Windows. Because WebKit.dll exports WebCore symbols,
+        they will be duplicated with WebCore.
+
 2019-11-05  Ryosuke Niwa  <rn...@webkit.org>
 
         REGRESSION (r251930): Flaky WK1 crash in printing/pseudo-class-outside-page.html

Modified: trunk/Source/cmake/OptionsWin.cmake (252085 => 252086)


--- trunk/Source/cmake/OptionsWin.cmake	2019-11-05 22:53:54 UTC (rev 252085)
+++ trunk/Source/cmake/OptionsWin.cmake	2019-11-05 22:57:46 UTC (rev 252086)
@@ -161,15 +161,6 @@
 set(PAL_LIBRARY_TYPE STATIC)
 set(WebKitLegacy_LIBRARY_TYPE SHARED)
 
-if (NOT ENABLE_UNIFIED_BUILDS)
-    if (WebCore_LIBRARY_TYPE MATCHES STATIC)
-        set(WebCore_LIBRARY_TYPE OBJECT)
-    endif ()
-    if (WebCoreTestSupport_LIBRARY_TYPE MATCHES STATIC)
-        set(WebCoreTestSupport_LIBRARY_TYPE OBJECT)
-    endif ()
-endif ()
-
 # If <winsock2.h> is not included before <windows.h> redefinition errors occur
 # unless _WINSOCKAPI_ is defined before <windows.h> is included
 add_definitions(-D_WINSOCKAPI_=)

Modified: trunk/Source/cmake/OptionsWinCairo.cmake (252085 => 252086)


--- trunk/Source/cmake/OptionsWinCairo.cmake	2019-11-05 22:53:54 UTC (rev 252085)
+++ trunk/Source/cmake/OptionsWinCairo.cmake	2019-11-05 22:57:46 UTC (rev 252086)
@@ -64,3 +64,7 @@
 # Override scripts directories
 set(WTF_SCRIPTS_DIR ${CMAKE_BINARY_DIR}/WTF/Scripts)
 set(_javascript_Core_SCRIPTS_DIR ${CMAKE_BINARY_DIR}/_javascript_Core/Scripts)
+
+# Override library types
+set(WebCore_LIBRARY_TYPE OBJECT)
+set(WebCoreTestSupport_LIBRARY_TYPE OBJECT)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to