Title: [272699] trunk
- Revision
- 272699
- Author
- don.olmst...@sony.com
- Date
- 2021-02-10 18:22:21 -0800 (Wed, 10 Feb 2021)
Log Message
[CMake] Enable hidden visibility on JSCOnly
https://bugs.webkit.org/show_bug.cgi?id=221726
Reviewed by Yusuke Suzuki.
Turn on hidden visibility for all *NIX ports of JSCOnly. To properly export the symbols
from WTF/bmalloc OBJECT libraries are used. This requires CMake 3.12 or later to
function properly.
* Source/cmake/OptionsJSCOnly.cmake:
Modified Paths
Diff
Modified: trunk/ChangeLog (272698 => 272699)
--- trunk/ChangeLog 2021-02-11 01:26:14 UTC (rev 272698)
+++ trunk/ChangeLog 2021-02-11 02:22:21 UTC (rev 272699)
@@ -1,3 +1,16 @@
+2021-02-10 Don Olmstead <don.olmst...@sony.com>
+
+ [CMake] Enable hidden visibility on JSCOnly
+ https://bugs.webkit.org/show_bug.cgi?id=221726
+
+ Reviewed by Yusuke Suzuki.
+
+ Turn on hidden visibility for all *NIX ports of JSCOnly. To properly export the symbols
+ from WTF/bmalloc OBJECT libraries are used. This requires CMake 3.12 or later to
+ function properly.
+
+ * Source/cmake/OptionsJSCOnly.cmake:
+
2021-02-10 Christopher Reid <chris.r...@sony.com>
[PlayStation] Add initial RESOURCE_USAGE implementation
Modified: trunk/Source/cmake/OptionsJSCOnly.cmake (272698 => 272699)
--- trunk/Source/cmake/OptionsJSCOnly.cmake 2021-02-11 01:26:14 UTC (rev 272698)
+++ trunk/Source/cmake/OptionsJSCOnly.cmake 2021-02-11 02:22:21 UTC (rev 272699)
@@ -2,6 +2,19 @@
if (MSVC)
include(OptionsMSVC)
+else ()
+ # CMake uses OBJECT libraries as a cross platform way of doing --whole-archive which is needed
+ # when compiling bmalloc/WTF into _javascript_Core. However they were extremely limited prior to
+ # CMake 3.12 <https://gitlab.kitware.com/cmake/cmake/-/issues/18010>
+ #
+ # FIXME: Remove when cmake_minimum_required is raised https://bugs.webkit.org/show_bug.cgi?id=221727
+ if (CMAKE_VERSION VERSION_LESS 3.12)
+ message(FATAL_ERROR "CMake 3.12 or greater is required to compile JSCOnly")
+ endif ()
+
+ set(CMAKE_C_VISIBILITY_PRESET hidden)
+ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+ set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
endif ()
add_definitions(-DBUILDING_JSCONLY__)
@@ -52,6 +65,8 @@
# https://bugs.webkit.org/show_bug.cgi?id=172862
if (NOT ENABLE_STATIC_JSC AND NOT WIN32)
set(_javascript_Core_LIBRARY_TYPE SHARED)
+ set(bmalloc_LIBRARY_TYPE OBJECT)
+ set(WTF_LIBRARY_TYPE OBJECT)
endif ()
if (WIN32)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes