Changeset 252086 in webkit


Ignore:
Timestamp:
Nov 5, 2019 2:57:46 PM (4 years ago)
Author:
Fujii Hironori
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.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r251963 r252086  
     12019-11-05  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win][CMake] Build WebCore as an OBJECT library for WinCairo port
     4        https://bugs.webkit.org/show_bug.cgi?id=203663
     5
     6        Reviewed by Ross Kirsling.
     7
     8        WebCore is using __declspec(dllexport) to export symbols, but it
     9        is built as a static library rather than a DLL. If any symbols in
     10        an object file aren't referenced from WebKit.dll, they won't be
     11        included in WebKit.dll.
     12
     13        This issue can be solved either by using OBJECT library for
     14        WebCore or using /WHOLEARCHIVE:WebCore.lib for WebKit.
     15
     16        This change takes OBJECT library approach becuase it doesn't
     17        generate unnecessary static libs (WebCore.lib) and it's already
     18        used for non-unified source builds for the library size issue (Bug
     19        196866 Comment 4).
     20
     21        However, AppleWin can't use it because the Apple internal builds
     22        need to generate the static libs and OBJECT library doesn't work
     23        well with makesafeseh.obj.
     24
     25        * Source/cmake/OptionsWin.cmake: Removed code overriding library types.
     26        * Source/cmake/OptionsWinCairo.cmake: Use OBJECT library types for WebCore and WebCoreTestSupport.
     27
    1282019-11-02  Devin Rousso  <drousso@apple.com>
    229
  • trunk/Source/WebCore/CMakeLists.txt

    r251841 r252086  
    12311231
    12321232set(WebCoreTestSupport_LIBRARIES
    1233     WebCore
    12341233    WebKit::JavaScriptCore
    12351234)
     1235if (NOT WTF_OS_WINDOWS)
     1236    list(APPEND WebCoreTestSupport_LIBRARIES WebCore)
     1237endif ()
    12361238
    12371239if (ENABLE_LEGACY_ENCRYPTED_MEDIA)
  • trunk/Source/WebCore/ChangeLog

    r252079 r252086  
     12019-11-05  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win][CMake] Build WebCore as an OBJECT library unless Apple internal builds
     4        https://bugs.webkit.org/show_bug.cgi?id=203663
     5
     6        Reviewed by Ross Kirsling.
     7
     8        No behavioral changes.
     9
     10        * CMakeLists.txt: Changed WebCoreTestSupport not to link with
     11        WebCore for Windows. Because WebKit.dll exports WebCore symbols,
     12        they will be duplicated with WebCore.
     13
    1142019-11-05  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/Source/cmake/OptionsWin.cmake

    r250597 r252086  
    162162set(WebKitLegacy_LIBRARY_TYPE SHARED)
    163163
    164 if (NOT ENABLE_UNIFIED_BUILDS)
    165     if (WebCore_LIBRARY_TYPE MATCHES STATIC)
    166         set(WebCore_LIBRARY_TYPE OBJECT)
    167     endif ()
    168     if (WebCoreTestSupport_LIBRARY_TYPE MATCHES STATIC)
    169         set(WebCoreTestSupport_LIBRARY_TYPE OBJECT)
    170     endif ()
    171 endif ()
    172 
    173164# If <winsock2.h> is not included before <windows.h> redefinition errors occur
    174165# unless _WINSOCKAPI_ is defined before <windows.h> is included
  • trunk/Source/cmake/OptionsWinCairo.cmake

    r249944 r252086  
    6565set(WTF_SCRIPTS_DIR ${CMAKE_BINARY_DIR}/WTF/Scripts)
    6666set(JavaScriptCore_SCRIPTS_DIR ${CMAKE_BINARY_DIR}/JavaScriptCore/Scripts)
     67
     68# Override library types
     69set(WebCore_LIBRARY_TYPE OBJECT)
     70set(WebCoreTestSupport_LIBRARY_TYPE OBJECT)
Note: See TracChangeset for help on using the changeset viewer.