Title: [226266] trunk
Revision
226266
Author
[email protected]
Date
2017-12-22 09:18:43 -0800 (Fri, 22 Dec 2017)

Log Message

[GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
https://bugs.webkit.org/show_bug.cgi?id=179914

Reviewed by Carlos Garcia Campos.

.:

* CMakeLists.txt:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsJSCOnly.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitCompilerFlags.cmake:
* Source/cmake/wpesymbols.filter: Removed.

Source/_javascript_Core:

Add a new _javascript_CoreGTK build target, to build JSC as a shared library. Link the
original _javascript_Core build target, which is now a static library, to it. Use
--whole-archive to prevent all the _javascript_Core symbols from being dropped, since none are
used directly by _javascript_CoreGTK.

The installed libjavascriptcoregtk-4.0 now corresponds to the _javascript_CoreGTK target,
instead of the _javascript_Core target. There is almost no difference on the installed system,
except that we now use a version script when linking, to hide private symbols, since they're
no longer needed by libwebkit2gtk-4.0.so.

Also, move the symbols map here.

* PlatformGTK.cmake:
* _javascript_coregtk-symbols.map: Added.

Source/WebCore:

* CMakeLists.txt: Test for WebCore_LIBRARY_TYPE rather than SHARED_CORE.

Source/WebKit:

Mark a few InjectedBundle symbols with default visibility, so they don't get hidden by
-fvisibility=hidden. Also, remove Windows conditionals, since Windows is not supported by
any GLib ports.

Also, move the symbols map to here, and share it between WPE and GTK.

* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformWPE.cmake:
* WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h:
* WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp:
* webkitglib-symbols.map: Renamed from Source/cmake/gtksymbols.filter.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/CMakeLists.txt (226265 => 226266)


--- trunk/CMakeLists.txt	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/CMakeLists.txt	2017-12-22 17:18:43 UTC (rev 226266)
@@ -121,17 +121,13 @@
 # -----------------------------------------------------------------------------
 # Default library types
 # -----------------------------------------------------------------------------
-option(SHARED_CORE "build WebCore as a shared library")
-
-if (SHARED_CORE)
-    set(WebCore_LIBRARY_TYPE SHARED)
-else ()
-    set(WebCore_LIBRARY_TYPE STATIC)
-endif ()
-
+# By default, only the highest-level libraries, WebKitLegacy and WebKit, are
+# shared, because properly building shared libraries that depend on each other
+# can be tricky. Override these in Options*.cmake for your port as needed.
 set(WTF_LIBRARY_TYPE STATIC)
-set(_javascript_Core_LIBRARY_TYPE SHARED)
+set(_javascript_Core_LIBRARY_TYPE STATIC)
 set(PAL_LIBRARY_TYPE STATIC)
+set(WebCore_LIBRARY_TYPE STATIC)
 set(WebKitLegacy_LIBRARY_TYPE SHARED)
 set(WebKit_LIBRARY_TYPE SHARED)
 set(WebCoreTestSupport_LIBRARY_TYPE STATIC)

Modified: trunk/ChangeLog (226265 => 226266)


--- trunk/ChangeLog	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/ChangeLog	2017-12-22 17:18:43 UTC (rev 226266)
@@ -1,3 +1,57 @@
+2017-12-22  Michael Catanzaro  <[email protected]>
+
+        [GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
+        https://bugs.webkit.org/show_bug.cgi?id=179914
+
+        Reviewed by Carlos Garcia Campos.
+
+        * CMakeLists.txt:
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsJSCOnly.cmake:
+        * Source/cmake/OptionsMac.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+        * Source/cmake/OptionsWin.cmake:
+        * Source/cmake/WebKitCompilerFlags.cmake:
+        * Source/cmake/wpesymbols.filter: Removed.
+
+2017-12-22  Michael Catanzaro  <[email protected]>
+
+        [GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
+        https://bugs.webkit.org/show_bug.cgi?id=179914
+
+        Reviewed by Carlos Garcia Campos.
+
+        Let's build JSC as a static library, and link that static lib to *both* our shared
+        libjavascriptcoregtk and libwebkit2gtk. Then we can fix this and also filter out all the
+        private symbols that we're currently exposing in libjavascriptcoregtk, which wouldn't be
+        possible otherwise. The cost of this is disk space. I think this trade-off is reasonable,
+        because it's the best way I could think of that accomplishes all our goals: (a) install two
+        shared libs, (b) export only public API symbols, (c) does not require any linker hacks.
+
+        Additionally, build with -fvisibility=hidden so that the compiler knows that many symbols
+        will be stripped out. This should improve code generation. It's actually how WPE was
+        previously compiled, but I removed this when I added the version script for WPE, because I
+        thought it was redundant with the version script. It is not, and we should use both,
+        according to Ulrich Drepper's "How to Write Shared Libraries." We will use
+        -fvisibility=hidden on all ports; this should be fine, as long as export macros are used
+        where needed. This is actually a totally separate change, but it makes sense to do it now if
+        we consider this bug a catch-all "fix how we link WebKit" issue.
+
+        * CMakeLists.txt: Rejigger the default library types, and remove the SHARED_CORE option,
+          which is not likely to work properly in ports that are not expecting it. These changes are
+          only mildly-related and certainly not required, but it makes sense to clean them up now.
+        * Source/cmake/OptionsGTK.cmake: Don't set the version script here.
+        * Source/cmake/OptionsJSCOnly.cmake: Adjust to changes in default library types.
+        * Source/cmake/OptionsMac.cmake: Adjust to changes in default library types. Override the
+          library type variables only when required.
+        * Source/cmake/OptionsWPE.cmake: Overriding the library type variables is no longer
+          required. Also, don't set the version script here.
+        * Source/cmake/OptionsWin.cmake: Adjust to changes in default library types. Override the
+          library type variables only when required.
+        * Source/cmake/WebKitCompilerFlags.cmake: Build with -fvisibility=hidden,
+          -fvisibility-inlines-hidden, and -Wno-attributes.
+        * Source/cmake/wpesymbols.filter: Removed.
+
 2017-12-20  Don Olmstead  <[email protected]>
 
         [CMake][Win] Add a way to set CMAKE_IGNORE_PATH

Modified: trunk/Source/_javascript_Core/ChangeLog (226265 => 226266)


--- trunk/Source/_javascript_Core/ChangeLog	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-12-22 17:18:43 UTC (rev 226266)
@@ -1,3 +1,25 @@
+2017-12-22  Michael Catanzaro  <[email protected]>
+
+        [GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
+        https://bugs.webkit.org/show_bug.cgi?id=179914
+
+        Reviewed by Carlos Garcia Campos.
+
+        Add a new _javascript_CoreGTK build target, to build JSC as a shared library. Link the
+        original _javascript_Core build target, which is now a static library, to it. Use
+        --whole-archive to prevent all the _javascript_Core symbols from being dropped, since none are
+        used directly by _javascript_CoreGTK.
+
+        The installed libjavascriptcoregtk-4.0 now corresponds to the _javascript_CoreGTK target,
+        instead of the _javascript_Core target. There is almost no difference on the installed system,
+        except that we now use a version script when linking, to hide private symbols, since they're
+        no longer needed by libwebkit2gtk-4.0.so.
+
+        Also, move the symbols map here.
+
+        * PlatformGTK.cmake:
+        * _javascript_coregtk-symbols.map: Added.
+
 2017-12-22  Yusuke Suzuki  <[email protected]>
 
         [DFG] Unify bunch of DFG 32bit code into 64bit code

Modified: trunk/Source/_javascript_Core/PlatformGTK.cmake (226265 => 226266)


--- trunk/Source/_javascript_Core/PlatformGTK.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/_javascript_Core/PlatformGTK.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -1,5 +1,3 @@
-set(_javascript_Core_OUTPUT_NAME _javascript_coregtk-${WEBKITGTK_API_VERSION})
-
 list(APPEND _javascript_Core_UNIFIED_SOURCE_LIST_FILES
     "SourcesGTK.txt"
 )
@@ -52,3 +50,23 @@
 list(APPEND _javascript_Core_SYSTEM_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
 )
+
+# Linking WebKit properly is extremely tricky. We need to build both a static library
+# and a shared library for JSC. See https://bugs.webkit.org/show_bug.cgi?id=179914.
+set(_javascript_CoreGTK_LIBRARIES
+    _javascript_Core${DEBUG_SUFFIX}
+)
+ADD_WHOLE_ARCHIVE_TO_LIBRARIES(_javascript_CoreGTK_LIBRARIES)
+
+add_library(_javascript_CoreGTK SHARED "${CMAKE_BINARY_DIR}/cmakeconfig.h")
+target_link_libraries(_javascript_CoreGTK ${_javascript_CoreGTK_LIBRARIES})
+set_target_properties(_javascript_CoreGTK PROPERTIES OUTPUT_NAME _javascript_coregtk-${WEBKITGTK_API_VERSION})
+
+WEBKIT_POPULATE_LIBRARY_VERSION(_javascript_CORE)
+set_target_properties(_javascript_CoreGTK PROPERTIES VERSION ${_javascript_CORE_VERSION} SOVERSION ${_javascript_CORE_VERSION_MAJOR})
+
+if (DEVELOPER_MODE)
+    WEBKIT_ADD_TARGET_PROPERTIES(_javascript_CoreGTK LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/_javascript_coregtk-symbols.map")
+endif ()
+
+install(TARGETS _javascript_CoreGTK DESTINATION "${LIB_INSTALL_DIR}")

Added: trunk/Source/_javascript_Core/_javascript_coregtk-symbols.map (0 => 226266)


--- trunk/Source/_javascript_Core/_javascript_coregtk-symbols.map	                        (rev 0)
+++ trunk/Source/_javascript_Core/_javascript_coregtk-symbols.map	2017-12-22 17:18:43 UTC (rev 226266)
@@ -0,0 +1,6 @@
+{
+global:
+  JS*;
+local:
+  *;
+};

Modified: trunk/Source/WebCore/CMakeLists.txt (226265 => 226266)


--- trunk/Source/WebCore/CMakeLists.txt	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/WebCore/CMakeLists.txt	2017-12-22 17:18:43 UTC (rev 226266)
@@ -1993,7 +1993,7 @@
 
 target_link_libraries(WebCore ${WebCore_LIBRARIES})
 
-if (SHARED_CORE)
+if (${WebCore_LIBRARY_TYPE} MATCHES "SHARED")
     set_target_properties(WebCore PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
     install(TARGETS WebCore DESTINATION "${LIB_INSTALL_DIR}")
 endif ()

Modified: trunk/Source/WebCore/ChangeLog (226265 => 226266)


--- trunk/Source/WebCore/ChangeLog	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/WebCore/ChangeLog	2017-12-22 17:18:43 UTC (rev 226266)
@@ -1,3 +1,12 @@
+2017-12-22  Michael Catanzaro  <[email protected]>
+
+        [GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
+        https://bugs.webkit.org/show_bug.cgi?id=179914
+
+        Reviewed by Carlos Garcia Campos.
+
+        * CMakeLists.txt: Test for WebCore_LIBRARY_TYPE rather than SHARED_CORE.
+
 2017-12-22  Zalan Bujtas  <[email protected]>
 
         [RenderTreeBuilder] Move RenderButton::addChild() tree mutation to RenderTreeBuilder

Modified: trunk/Source/WebKit/CMakeLists.txt (226265 => 226266)


--- trunk/Source/WebKit/CMakeLists.txt	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/WebKit/CMakeLists.txt	2017-12-22 17:18:43 UTC (rev 226266)
@@ -938,10 +938,6 @@
     target_link_libraries(WebKit -Wl,--start-group WebCore WebCoreDerivedSources -Wl,--end-group)
 endif ()
 
-if (WebKit_VERSION_SCRIPT)
-    WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "${WebKit_VERSION_SCRIPT}")
-endif ()
-
 add_executable(WebProcess ${WebProcess_SOURCES})
 ADD_WEBKIT_PREFIX_HEADER(WebProcess)
 target_link_libraries(WebProcess ${WebProcess_LIBRARIES})

Modified: trunk/Source/WebKit/ChangeLog (226265 => 226266)


--- trunk/Source/WebKit/ChangeLog	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/WebKit/ChangeLog	2017-12-22 17:18:43 UTC (rev 226266)
@@ -1,3 +1,23 @@
+2017-12-22  Michael Catanzaro  <[email protected]>
+
+        [GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
+        https://bugs.webkit.org/show_bug.cgi?id=179914
+
+        Reviewed by Carlos Garcia Campos.
+
+        Mark a few InjectedBundle symbols with default visibility, so they don't get hidden by
+        -fvisibility=hidden. Also, remove Windows conditionals, since Windows is not supported by
+        any GLib ports.
+
+        Also, move the symbols map to here, and share it between WPE and GTK.
+
+        * CMakeLists.txt:
+        * PlatformGTK.cmake:
+        * PlatformWPE.cmake:
+        * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h:
+        * WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp:
+        * webkitglib-symbols.map: Renamed from Source/cmake/gtksymbols.filter.
+
 2017-12-21  Michael Catanzaro  <[email protected]>
 
         [WPE][GTK] Deprecate and replace webkit_form_submission_request_get_text_fields

Modified: trunk/Source/WebKit/PlatformGTK.cmake (226265 => 226266)


--- trunk/Source/WebKit/PlatformGTK.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/WebKit/PlatformGTK.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -24,6 +24,10 @@
 add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
 add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
 
+if (DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
+    WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/webkitglib-symbols.map")
+endif ()
+
 # Temporary workaround to allow the build to succeed.
 file(REMOVE "${FORWARDING_HEADERS_DIR}/WebCore/Settings.h")
 

Modified: trunk/Source/WebKit/PlatformWPE.cmake (226265 => 226266)


--- trunk/Source/WebKit/PlatformWPE.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/WebKit/PlatformWPE.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -16,6 +16,10 @@
 add_definitions(-DLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
 add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
 
+if (DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
+    WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/webkitglib-symbols.map")
+endif ()
+
 # Temporary workaround to allow the build to succeed.
 file(REMOVE "${FORWARDING_HEADERS_DIR}/WebCore/Settings.h")
 

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h (226265 => 226266)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h	2017-12-22 17:18:43 UTC (rev 226266)
@@ -38,9 +38,9 @@
 class WebKitExtensionManager {
     WTF_MAKE_NONCOPYABLE(WebKitExtensionManager);
 public:
-    static WebKitExtensionManager& singleton();
+    __attribute__((visibility("default"))) static WebKitExtensionManager& singleton();
 
-    void initialize(InjectedBundle*, API::Object*);
+    __attribute__((visibility("default"))) void initialize(InjectedBundle*, API::Object*);
 
 private:
     WebKitExtensionManager();

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp (226265 => 226266)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp	2017-12-22 17:18:43 UTC (rev 226266)
@@ -26,11 +26,7 @@
 
 using namespace WebKit;
 
-#if defined(WIN32) || defined(_WIN32)
-extern "C" __declspec(dllexport)
-#else
-extern "C"
-#endif
+extern "C" __attribute__((visibility("default")))
 void WKBundleInitialize(WKBundleRef bundle, WKTypeRef userData)
 {
     WebKitExtensionManager::singleton().initialize(toImpl(bundle), toImpl(userData));

Copied: trunk/Source/WebKit/webkitglib-symbols.map (from rev 226265, trunk/Source/cmake/gtksymbols.filter) (0 => 226266)


--- trunk/Source/WebKit/webkitglib-symbols.map	                        (rev 0)
+++ trunk/Source/WebKit/webkitglib-symbols.map	2017-12-22 17:18:43 UTC (rev 226266)
@@ -0,0 +1,15 @@
+{
+global:
+  webkit_*;
+  WebProcessMainUnix;
+  NetworkProcessMainUnix;
+  PluginProcessMainUnix;
+  StorageProcessMainUnix;
+  extern "C++" {
+    "WebKit::WebKitExtensionManager::singleton()";
+    "WebKit::WebKitExtensionManager::initialize(WebKit::InjectedBundle*, API::Object*)";
+  };
+local:
+  webkit_media_player_debug;
+  *;
+};

Modified: trunk/Source/cmake/OptionsGTK.cmake (226265 => 226266)


--- trunk/Source/cmake/OptionsGTK.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/cmake/OptionsGTK.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -106,9 +106,6 @@
 else ()
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MINIBROWSER PUBLIC OFF)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS PRIVATE OFF)
-    if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
-        set(WebKit_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter")
-    endif ()
 endif ()
 
 if (CMAKE_SYSTEM_NAME MATCHES "Linux")

Modified: trunk/Source/cmake/OptionsJSCOnly.cmake (226265 => 226266)


--- trunk/Source/cmake/OptionsJSCOnly.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/cmake/OptionsJSCOnly.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -48,8 +48,8 @@
 
 # FIXME: JSCOnly on WIN32 seems to only work with fully static build
 # https://bugs.webkit.org/show_bug.cgi?id=172862
-if (ENABLE_STATIC_JSC OR WIN32)
-    set(_javascript_Core_LIBRARY_TYPE STATIC)
+if (NOT ENABLE_STATIC_JSC AND NOT WIN32)
+    set(_javascript_Core_LIBRARY_TYPE SHARED)
 endif ()
 
 if (WIN32)

Modified: trunk/Source/cmake/OptionsMac.cmake (226265 => 226266)


--- trunk/Source/cmake/OptionsMac.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/cmake/OptionsMac.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -57,9 +57,9 @@
 set(ENABLE_WEBKIT_LEGACY ON)
 set(ENABLE_WEBKIT ON)
 
+set(_javascript_Core_LIBRARY_TYPE SHARED)
 set(WebCore_LIBRARY_TYPE SHARED)
 set(WebCoreTestSupport_LIBRARY_TYPE SHARED)
-set(WebKit_LIBRARY_TYPE SHARED)
 
 add_definitions(-DU_DISABLE_RENAMING=1 -DU_SHOW_CPLUSPLUS_API=0)
 set(ICU_LIBRARIES libicucore.dylib)

Modified: trunk/Source/cmake/OptionsWPE.cmake (226265 => 226266)


--- trunk/Source/cmake/OptionsWPE.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/cmake/OptionsWPE.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -50,9 +50,6 @@
 
 WEBKIT_OPTION_END()
 
-set(_javascript_Core_LIBRARY_TYPE STATIC)
-set(WebCore_LIBRARY_TYPE STATIC)
-
 find_package(Cairo 1.10.2 REQUIRED)
 find_package(Fontconfig 2.8.0 REQUIRED)
 find_package(Freetype2 2.4.2 REQUIRED)
@@ -113,8 +110,4 @@
 set(FORWARDING_HEADERS_WPE_EXTENSION_DIR ${FORWARDING_HEADERS_DIR}/wpe-webextension)
 set(DERIVED_SOURCES_WPE_API_DIR ${DERIVED_SOURCES_WEBKIT_DIR}/wpe)
 
-if (NOT DEVELOPER_MODE)
-    set(WebKit_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/wpesymbols.filter")
-endif ()
-
 include(GStreamerChecks)

Modified: trunk/Source/cmake/OptionsWin.cmake (226265 => 226266)


--- trunk/Source/cmake/OptionsWin.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/cmake/OptionsWin.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -141,8 +141,5 @@
 set(PORT Win)
 set(_javascript_Core_LIBRARY_TYPE SHARED)
 set(WTF_LIBRARY_TYPE SHARED)
-set(PAL_LIBRARY_TYPE STATIC)
-set(WebKit_LIBRARY_TYPE SHARED)
-set(WebKitLegacy_LIBRARY_TYPE SHARED)
 
 find_package(ICU REQUIRED)

Modified: trunk/Source/cmake/WebKitCompilerFlags.cmake (226265 => 226266)


--- trunk/Source/cmake/WebKitCompilerFlags.cmake	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/cmake/WebKitCompilerFlags.cmake	2017-12-22 17:18:43 UTC (rev 226266)
@@ -105,6 +105,13 @@
         WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++14
                                        -fno-rtti)
 
+        if (UNIX AND NOT DEVELOPER_MODE)
+            # These are used even for ports that use symbol maps so that the
+            # compiler can take visibility into account for code optimization.
+            WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fvisibility=hidden)
+            WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fvisibility-inlines-hidden)
+        endif ()
+
         if (WIN32)
             WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-mno-ms-bitfields)
             WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-unknown-pragmas)
@@ -128,6 +135,11 @@
                                          -Wno-maybe-uninitialized
                                          -Wno-noexcept-type
                                          -Wno-parentheses-equality)
+
+    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947
+    if (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "8.0" AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+        WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-attributes)
+    endif ()
 endif ()
 
 # -Wexpansion-to-defined produces false positives with GCC but not Clang

Deleted: trunk/Source/cmake/gtksymbols.filter (226265 => 226266)


--- trunk/Source/cmake/gtksymbols.filter	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/cmake/gtksymbols.filter	2017-12-22 17:18:43 UTC (rev 226266)
@@ -1,13 +0,0 @@
-{
-global:
-  webkit_*;
-  WebProcessMainUnix;
-  NetworkProcessMainUnix;
-  PluginProcessMainUnix;
-  StorageProcessMainUnix;
-  _ZN6WebKit22WebKitExtensionManager10initializeEPNS_14InjectedBundleEPN3API6ObjectE;
-  _ZN6WebKit22WebKitExtensionManager9singletonEv;
-local:
-  webkit_media_player_debug;
-  *;
-};

Deleted: trunk/Source/cmake/wpesymbols.filter (226265 => 226266)


--- trunk/Source/cmake/wpesymbols.filter	2017-12-22 16:28:50 UTC (rev 226265)
+++ trunk/Source/cmake/wpesymbols.filter	2017-12-22 17:18:43 UTC (rev 226266)
@@ -1,12 +0,0 @@
-{
-global:
-  webkit_*;
-  WebProcessMainUnix;
-  NetworkProcessMainUnix;
-  StorageProcessMainUnix;
-  _ZN6WebKit22WebKitExtensionManager10initializeEPNS_14InjectedBundleEPN3API6ObjectE;
-  _ZN6WebKit22WebKitExtensionManager9singletonEv;
-local:
-  webkit_media_player_debug;
-  *;
-};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to