Changeset 257619 in webkit


Ignore:
Timestamp:
Feb 27, 2020 10:25:51 PM (4 years ago)
Author:
don.olmstead@sony.com
Message:

Fix WebCore export macros for declspec
https://bugs.webkit.org/show_bug.cgi?id=208363

Reviewed by Konstantin Tokarev.

Source/WebCore:

Modified the PlatformExportMacros to match the other export macros. Originally
Windows ports were treated differently and they had to set their own export macros.
This isn't ideal because how WebCore is built is really dependent on the CMake
definition of the library type.

  • CMakeLists.txt:
  • WebCorePrefix.h:
  • platform/PlatformExportMacros.h:
  • testing/js/WebCoreTestSupportPrefix.h:

Source/WebKit:

Add compilation definitions for static linking of PAL and WebCore in WebKit.

  • PlatformFTW.cmake:
  • PlatformWin.cmake:
  • config.h:

Source/WebKitLegacy:

Add compilation definitions for static linking of PAL and WebCore in WebKitLegacy.

  • PlatformFTW.cmake:
  • PlatformWin.cmake:

Source/WebKitLegacy/win:

Remove setting of WEBCORE_EXPORT from the header files.

  • WebKitPrefix.h:

Tools:

Remove setting of WEBCORE_EXPORT and WEBCORE_TESTSUPPORT_EXPORT from the header
files. Removed precompiled headers that were empty.

  • DumpRenderTree/DumpRenderTreePrefix.h:
  • DumpRenderTree/win/DefaultPolicyDelegate.cpp: Added a missing config.h.
  • MiniBrowser/win/stdafx.h:
  • TestWebKitAPI/win/TestWebKitAPIPrefix.cpp: Removed.
  • TestWebKitAPI/win/TestWebKitAPIPrefix.h: Removed.
  • WebKitTestRunner/InjectedBundle/win/TestRunnerInjectedBundlePrefix.cpp: Removed.
  • WebKitTestRunner/InjectedBundle/win/TestRunnerInjectedBundlePrefix.h: Removed.
  • WebKitTestRunner/PlatformFTW.cmake:
  • WebKitTestRunner/PlatformWin.cmake:
  • WebKitTestRunner/WebKitTestRunnerPrefix.h:
Location:
trunk
Files:
4 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r257587 r257619  
    19921992add_library(WebCoreTestSupport ${WebCoreTestSupport_LIBRARY_TYPE} ${WebCoreTestSupport_SOURCES})
    19931993add_dependencies(WebCoreTestSupport WebCore WebCoreTestSupportBindings)
     1994target_compile_definitions(WebCoreTestSupport PRIVATE "BUILDING_WebCoreTestSupport")
    19941995target_include_directories(WebCoreTestSupport PUBLIC ${WebCoreTestSupport_INCLUDE_DIRECTORIES} ${WebCore_INCLUDE_DIRECTORIES})
    19951996target_include_directories(WebCoreTestSupport PRIVATE ${WebCoreTestSupport_PRIVATE_INCLUDE_DIRECTORIES} ${WebCore_PRIVATE_INCLUDE_DIRECTORIES})
  • trunk/Source/WebCore/ChangeLog

    r257617 r257619  
     12020-02-27  Don Olmstead  <don.olmstead@sony.com>
     2
     3        Fix WebCore export macros for declspec
     4        https://bugs.webkit.org/show_bug.cgi?id=208363
     5
     6        Reviewed by Konstantin Tokarev.
     7
     8        Modified the PlatformExportMacros to match the other export macros. Originally
     9        Windows ports were treated differently and they had to set their own export macros.
     10        This isn't ideal because how WebCore is built is really dependent on the CMake
     11        definition of the library type.
     12
     13        * CMakeLists.txt:
     14        * WebCorePrefix.h:
     15        * platform/PlatformExportMacros.h:
     16        * testing/js/WebCoreTestSupportPrefix.h:
     17
    1182020-02-27  Dean Jackson  <dino@apple.com>
    219
  • trunk/Source/WebCore/WebCorePrefix.h

    r252166 r257619  
    4242#endif
    4343
    44 #if PLATFORM(WIN)
    45 #undef WEBCORE_EXPORT
    46 #define WEBCORE_EXPORT WTF_EXPORT_DECLARATION
    47 #else
     44#if !OS(WINDOWS)
    4845#include <pthread.h>
    49 #endif // PLATFORM(WIN)
     46#endif // !OS(WINDOWS)
    5047
    5148#include <sys/types.h>
  • trunk/Source/WebCore/platform/PlatformExportMacros.h

    r256720 r257619  
    3232#include <wtf/ExportMacros.h>
    3333
    34 #if USE(EXPORT_MACROS)
     34#if !defined(WEBCORE_EXPORT)
     35#if defined(BUILDING_WebCore) || defined(STATICALLY_LINKED_WITH_WebCore)
     36#define WEBCORE_EXPORT WTF_EXPORT_DECLARATION
     37#else
     38#define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
     39#endif
     40#endif
    3541
    36 #if !PLATFORM(WIN)
    37 #define WEBCORE_EXPORT WTF_EXPORT_DECLARATION
     42#if !defined(WEBCORE_TESTSUPPORT_EXPORT)
     43#if defined(BUILDING_WebCoreTestSupport) || defined(STATICALLY_LINKED_WITH_WebCoreTestSupport)
    3844#define WEBCORE_TESTSUPPORT_EXPORT WTF_EXPORT_DECLARATION
    3945#else
    40 // Windows must set this per-project
     46#define WEBCORE_TESTSUPPORT_EXPORT WTF_IMPORT_DECLARATION
    4147#endif
    42 
    43 #else // !USE(EXPORT_MACROS)
    44 #define WEBCORE_EXPORT
    45 #define WEBCORE_TESTSUPPORT_EXPORT
    46 
    47 #endif // USE(EXPORT_MACROS)
     48#endif
  • trunk/Source/WebCore/testing/js/WebCoreTestSupportPrefix.h

    r252166 r257619  
    4242#endif
    4343
    44 #if OS(WINDOWS)
    45 #undef WEBCORE_EXPORT
    46 #define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
    47 #define WEBCORE_TESTSUPPORT_EXPORT
    48 #else
    49 
     44#if !OS(WINDOWS)
    5045#include <pthread.h>
    5146
  • trunk/Source/WebKit/ChangeLog

    r257618 r257619  
     12020-02-27  Don Olmstead  <don.olmstead@sony.com>
     2
     3        Fix WebCore export macros for declspec
     4        https://bugs.webkit.org/show_bug.cgi?id=208363
     5
     6        Reviewed by Konstantin Tokarev.
     7
     8        Add compilation definitions for static linking of PAL and WebCore in WebKit.
     9
     10        * PlatformFTW.cmake:
     11        * PlatformWin.cmake:
     12        * config.h:
     13
    1142020-02-27  Tim Horton  <timothy_horton@apple.com>
    215
  • trunk/Source/WebKit/PlatformFTW.cmake

    r256731 r257619  
    383383    FLATTENED
    384384)
     385
     386list(APPEND WebKit_PRIVATE_DEFINITIONS
     387    STATICALLY_LINKED_WITH_PAL
     388    STATICALLY_LINKED_WITH_WebCore
     389)
  • trunk/Source/WebKit/PlatformWin.cmake

    r256731 r257619  
    382382    FLATTENED
    383383)
     384
     385list(APPEND WebKit_PRIVATE_DEFINITIONS
     386    STATICALLY_LINKED_WITH_PAL
     387    STATICALLY_LINKED_WITH_WebCore
     388)
  • trunk/Source/WebKit/config.h

    r252166 r257619  
    3434#include <wtf/DisallowCType.h>
    3535
    36 #if PLATFORM(WIN)
    37 #undef WEBCORE_EXPORT
    38 #define WEBCORE_EXPORT WTF_EXPORT_DECLARATION
    39 #endif // PLATFORM(WIN)
    40 
    4136#ifdef __cplusplus
    4237
  • trunk/Source/WebKitLegacy/ChangeLog

    r257587 r257619  
     12020-02-27  Don Olmstead  <don.olmstead@sony.com>
     2
     3        Fix WebCore export macros for declspec
     4        https://bugs.webkit.org/show_bug.cgi?id=208363
     5
     6        Reviewed by Konstantin Tokarev.
     7
     8        Add compilation definitions for static linking of PAL and WebCore in WebKitLegacy.
     9
     10        * PlatformFTW.cmake:
     11        * PlatformWin.cmake:
     12
    1132020-02-27  Don Olmstead  <don.olmstead@sony.com>
    214
  • trunk/Source/WebKitLegacy/PlatformFTW.cmake

    r256731 r257619  
    475475    WebKit${DEBUG_SUFFIX}
    476476)
     477
     478list(APPEND WebKitLegacy_PRIVATE_DEFINITIONS
     479    STATICALLY_LINKED_WITH_PAL
     480    STATICALLY_LINKED_WITH_WebCore
     481)
  • trunk/Source/WebKitLegacy/PlatformWin.cmake

    r256731 r257619  
    490490    WebKit${DEBUG_SUFFIX}
    491491)
     492
     493list(APPEND WebKitLegacy_PRIVATE_DEFINITIONS
     494    STATICALLY_LINKED_WITH_PAL
     495    STATICALLY_LINKED_WITH_WebCore
     496)
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r257592 r257619  
     12020-02-27  Don Olmstead  <don.olmstead@sony.com>
     2
     3        Fix WebCore export macros for declspec
     4        https://bugs.webkit.org/show_bug.cgi?id=208363
     5
     6        Reviewed by Konstantin Tokarev.
     7
     8        Remove setting of WEBCORE_EXPORT from the header files.
     9
     10        * WebKitPrefix.h:
     11
    1122020-02-27  Daniel Bates  <dabates@apple.com>
    213
  • trunk/Source/WebKitLegacy/win/WebKitPrefix.h

    r235531 r257619  
    6868#endif
    6969#endif /* USE(CG) */
    70 
    71 // WebKit.dll is expected to export the symbols in WebCore that have been marked
    72 // as WEBCORE_EXPORT
    73 #undef WEBCORE_EXPORT
    74 #define WEBCORE_EXPORT WTF_EXPORT_DECLARATION
  • trunk/Tools/ChangeLog

    r257618 r257619  
     12020-02-27  Don Olmstead  <don.olmstead@sony.com>
     2
     3        Fix WebCore export macros for declspec
     4        https://bugs.webkit.org/show_bug.cgi?id=208363
     5
     6        Reviewed by Konstantin Tokarev.
     7
     8        Remove setting of WEBCORE_EXPORT and WEBCORE_TESTSUPPORT_EXPORT from the header
     9        files. Removed precompiled headers that were empty.
     10
     11        * DumpRenderTree/DumpRenderTreePrefix.h:
     12        * DumpRenderTree/win/DefaultPolicyDelegate.cpp: Added a missing config.h.
     13        * MiniBrowser/win/stdafx.h:
     14        * TestWebKitAPI/win/TestWebKitAPIPrefix.cpp: Removed.
     15        * TestWebKitAPI/win/TestWebKitAPIPrefix.h: Removed.
     16        * WebKitTestRunner/InjectedBundle/win/TestRunnerInjectedBundlePrefix.cpp: Removed.
     17        * WebKitTestRunner/InjectedBundle/win/TestRunnerInjectedBundlePrefix.h: Removed.
     18        * WebKitTestRunner/PlatformFTW.cmake:
     19        * WebKitTestRunner/PlatformWin.cmake:
     20        * WebKitTestRunner/WebKitTestRunnerPrefix.h:
     21
    1222020-02-27  Tim Horton  <timothy_horton@apple.com>
    223
  • trunk/Tools/DumpRenderTree/DumpRenderTreePrefix.h

    r242279 r257619  
    3636#import <Foundation/Foundation.h>
    3737#endif
    38 
    39 #if PLATFORM(WIN)
    40 #undef WEBCORE_EXPORT
    41 #define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
    42 #undef WEBCORE_TESTSUPPORT_EXPORT
    43 #define WEBCORE_TESTSUPPORT_EXPORT
    44 #endif
  • trunk/Tools/DumpRenderTree/win/DefaultPolicyDelegate.cpp

    r249746 r257619  
    2424 */
    2525
     26#include "config.h"
    2627#include "DefaultPolicyDelegate.h"
    2728
  • trunk/Tools/MiniBrowser/win/stdafx.h

    r256720 r257619  
    5858#include <windows.h>
    5959#include <wininet.h>
    60 #include <wtf/ExportMacros.h>
    6160#include <wtf/Platform.h>
     61
     62#include <JavaScriptCore/JSExportMacros.h>
     63#include <WebCore/PlatformExportMacros.h>
    6264
    6365#if 0
     
    7072#endif
    7173#endif
    72 
    73 #define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
  • trunk/Tools/WebKitTestRunner/PlatformFTW.cmake

    r250121 r257619  
    5454    WebKitTestRunnerLib_SOURCES
    5555)
    56 WEBKIT_ADD_PRECOMPILED_HEADER(TestRunnerInjectedBundlePrefix.h
    57     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/TestRunnerInjectedBundlePrefix.cpp
    58     WebKitTestRunnerInjectedBundle_SOURCES
    59 )
    6056
    6157list(APPEND
  • trunk/Tools/WebKitTestRunner/PlatformWin.cmake

    r255670 r257619  
    5858    WebKitTestRunnerLib_SOURCES
    5959)
    60 WEBKIT_ADD_PRECOMPILED_HEADER(TestRunnerInjectedBundlePrefix.h
    61     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/TestRunnerInjectedBundlePrefix.cpp
    62     WebKitTestRunnerInjectedBundle_SOURCES
    63 )
    6460
    6561list(APPEND
  • trunk/Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h

    r252166 r257619  
    4848#undef catch
    4949#endif
    50 
    51 #if PLATFORM(WIN)
    52 #undef WEBCORE_EXPORT
    53 #define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
    54 #undef WEBCORE_TESTSUPPORT_EXPORT
    55 #define WEBCORE_TESTSUPPORT_EXPORT
    56 #endif
Note: See TracChangeset for help on using the changeset viewer.