- Revision
- 274166
- Author
- [email protected]
- Date
- 2021-03-09 12:11:42 -0800 (Tue, 09 Mar 2021)
Log Message
.:
[GTK] Reenable -fvisibility=hidden
https://bugs.webkit.org/show_bug.cgi?id=181916
Patch by Michael Catanzaro <[email protected]> on 2021-03-09
Reviewed by Don Olmstead.
In non-DEVELOPER_MODE builds, we rely on a linker version script to hide symbols that we
don't want to export. Building with hidden visibility might seem redundant with this, but
actually building with hidden visibility has advantages anyway. See
https://gcc.gnu.org/wiki/Visibility.
Note that I'm not confident GTK port can safely use -fvisibility-inlines-hidden, since it's
split between two shared objects. Also, because GTK is split into two shared objects, GTK
needs to build bmalloc and WTF as CMake OBJECT libraries, which is effectively the same as
using -Wl,--whole-archive to prevent symbols from being prematurely stripped away.
P.S. Major credit to Don Olmstead, who did most of the work to make this possible, which has
already landed in previous patches.
* Source/cmake/OptionsGTK.cmake:
Source/WebCore:
[WPE][GTK] Reenable -fvisibility=hidden (and -fvisibility-inlines-hidden for WPE)
https://bugs.webkit.org/show_bug.cgi?id=181916
Patch by Michael Catanzaro <[email protected]> on 2021-03-09
Reviewed by Don Olmstead.
We need to export the destructor of EventTarget.
* PlatformGTK.cmake:
* dom/EventTarget.cpp:
* dom/EventTarget.h:
Tools:
[GTK] Reenable -fvisibility=hidden
https://bugs.webkit.org/show_bug.cgi?id=181916
Patch by Michael Catanzaro <[email protected]> on 2021-03-09
Reviewed by Don Olmstead.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/glib/TestExpectations.json:
Modified Paths
Diff
Modified: trunk/ChangeLog (274165 => 274166)
--- trunk/ChangeLog 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/ChangeLog 2021-03-09 20:11:42 UTC (rev 274166)
@@ -1,3 +1,25 @@
+2021-03-09 Michael Catanzaro <[email protected]>
+
+ [GTK] Reenable -fvisibility=hidden
+ https://bugs.webkit.org/show_bug.cgi?id=181916
+
+ Reviewed by Don Olmstead.
+
+ In non-DEVELOPER_MODE builds, we rely on a linker version script to hide symbols that we
+ don't want to export. Building with hidden visibility might seem redundant with this, but
+ actually building with hidden visibility has advantages anyway. See
+ https://gcc.gnu.org/wiki/Visibility.
+
+ Note that I'm not confident GTK port can safely use -fvisibility-inlines-hidden, since it's
+ split between two shared objects. Also, because GTK is split into two shared objects, GTK
+ needs to build bmalloc and WTF as CMake OBJECT libraries, which is effectively the same as
+ using -Wl,--whole-archive to prevent symbols from being prematurely stripped away.
+
+ P.S. Major credit to Don Olmstead, who did most of the work to make this possible, which has
+ already landed in previous patches.
+
+ * Source/cmake/OptionsGTK.cmake:
+
2021-03-05 Michael Catanzaro <[email protected]>
[GTK] Remove ADD_WHOLE_ARCHIVE_TO_LIBRARIES
Modified: trunk/Source/WebCore/ChangeLog (274165 => 274166)
--- trunk/Source/WebCore/ChangeLog 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/Source/WebCore/ChangeLog 2021-03-09 20:11:42 UTC (rev 274166)
@@ -1,3 +1,16 @@
+2021-03-09 Michael Catanzaro <[email protected]>
+
+ [WPE][GTK] Reenable -fvisibility=hidden (and -fvisibility-inlines-hidden for WPE)
+ https://bugs.webkit.org/show_bug.cgi?id=181916
+
+ Reviewed by Don Olmstead.
+
+ We need to export the destructor of EventTarget.
+
+ * PlatformGTK.cmake:
+ * dom/EventTarget.cpp:
+ * dom/EventTarget.h:
+
2021-03-09 Antoine Quint <[email protected]>
[Web Animations] setKeyframes does not preserve animation's current offset
Modified: trunk/Source/WebCore/PlatformGTK.cmake (274165 => 274166)
--- trunk/Source/WebCore/PlatformGTK.cmake 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/Source/WebCore/PlatformGTK.cmake 2021-03-09 20:11:42 UTC (rev 274166)
@@ -8,13 +8,6 @@
set(WebCore_OUTPUT_NAME WebCoreGTK)
-# FIXME: https://bugs.webkit.org/show_bug.cgi?id=181916
-# Remove these lines when turning on hidden visibility
-list(APPEND WebCore_PRIVATE_LIBRARIES WebKit::WTF)
-if (NOT USE_SYSTEM_MALLOC)
- list(APPEND WebCore_PRIVATE_LIBRARIES WebKit::bmalloc)
-endif ()
-
list(APPEND WebCore_UNIFIED_SOURCE_LIST_FILES
"SourcesGTK.txt"
Modified: trunk/Source/WebCore/dom/EventTarget.cpp (274165 => 274166)
--- trunk/Source/WebCore/dom/EventTarget.cpp 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/Source/WebCore/dom/EventTarget.cpp 2021-03-09 20:11:42 UTC (rev 274166)
@@ -66,6 +66,8 @@
return EventTargetConcrete::create(context);
}
+EventTarget::~EventTarget() = default;
+
bool EventTarget::isNode() const
{
return false;
Modified: trunk/Source/WebCore/dom/EventTarget.h (274165 => 274166)
--- trunk/Source/WebCore/dom/EventTarget.h 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/Source/WebCore/dom/EventTarget.h 2021-03-09 20:11:42 UTC (rev 274166)
@@ -103,7 +103,7 @@
const EventTargetData* eventTargetData() const;
protected:
- virtual ~EventTarget() = default;
+ WEBCORE_EXPORT virtual ~EventTarget();
virtual EventTargetData* eventTargetData() = 0;
virtual EventTargetData* eventTargetDataConcurrently() = 0;
Modified: trunk/Source/cmake/OptionsGTK.cmake (274165 => 274166)
--- trunk/Source/cmake/OptionsGTK.cmake 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/Source/cmake/OptionsGTK.cmake 2021-03-09 20:11:42 UTC (rev 274166)
@@ -18,6 +18,11 @@
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(_javascript_CORE 37 0 19)
+set(CMAKE_C_VISIBILITY_PRESET hidden)
+set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+set(bmalloc_LIBRARY_TYPE OBJECT)
+set(WTF_LIBRARY_TYPE OBJECT)
+
# These are shared variables, but we special case their definition so that we can use the
# CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro.
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory")
Modified: trunk/Tools/ChangeLog (274165 => 274166)
--- trunk/Tools/ChangeLog 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/Tools/ChangeLog 2021-03-09 20:11:42 UTC (rev 274166)
@@ -1,3 +1,13 @@
+2021-03-09 Michael Catanzaro <[email protected]>
+
+ [GTK] Reenable -fvisibility=hidden
+ https://bugs.webkit.org/show_bug.cgi?id=181916
+
+ Reviewed by Don Olmstead.
+
+ * TestWebKitAPI/PlatformGTK.cmake:
+ * TestWebKitAPI/glib/TestExpectations.json:
+
2021-03-09 Mark Lam <[email protected]>
Use --verifyGC=true on some JSC stress test configurations.
Modified: trunk/Tools/TestWebKitAPI/PlatformGTK.cmake (274165 => 274166)
--- trunk/Tools/TestWebKitAPI/PlatformGTK.cmake 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/Tools/TestWebKitAPI/PlatformGTK.cmake 2021-03-09 20:11:42 UTC (rev 274166)
@@ -28,9 +28,6 @@
GTK::GTK
)
-# FIXME: Remove when turning on hidden visibility https://bugs.webkit.org/show_bug.cgi?id=181916
-list(APPEND TestJavaScriptCore_LIBRARIES WTF)
-
# TestWebCore
list(APPEND TestWebCore_SOURCES
${test_main_SOURCES}
Modified: trunk/Tools/TestWebKitAPI/glib/TestExpectations.json (274165 => 274166)
--- trunk/Tools/TestWebKitAPI/glib/TestExpectations.json 2021-03-09 20:09:49 UTC (rev 274165)
+++ trunk/Tools/TestWebKitAPI/glib/TestExpectations.json 2021-03-09 20:11:42 UTC (rev 274166)
@@ -294,6 +294,9 @@
"subtests": {
"/jsc/vm": {
"expected": {"all": {"slow": true}}
+ },
+ "/jsc/weak-value": {
+ "expected": {"all": {"status": ["FAIL", "PASS"], "bug": "webkit.org/b/222972"}}
}
}
},