FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[PlayStation] Build a shared JavaScriptCore · WebKit/WebKit@0a7e412 · GitHub

/ WebKit Public

Commit 0a7e412

Browse files
committed
[PlayStation] Build a shared JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=198446 Reviewed by Fujii Hironori. .: Compile bmalloc and WTF as OBJECT libraries that are then linked into a shared JavaScriptCore. Using OBJECT libraries is a modern CMake way to have the behavior of --whole-archive. * Source/cmake/OptionsPlayStation.cmake: Source/JavaScriptCore: Add TARGET_OBJECTS for bmalloc and WTF so JavaScriptCore links. Add bmalloc and WTF compile definitions so exports are exposed. * PlatformPlayStation.cmake: Source/WTF: Add bmalloc definition when compiling WTF. Remove LanguageUnix.cpp since LanguagePlayStation.cpp is present which results in duplicate symbol definitions. * wtf/PlatformPlayStation.cmake: Tools: Add TARGET_OBJECTS for bmalloc and WTF so TestWTF links. * TestWebKitAPI/PlatformPlayStation.cmake: Canonical link: https://commits.webkit.org/220312@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent f278d87 commit 0a7e412

8 files changed

Lines changed: 85 additions & 8 deletions

File tree

‎ChangeLog‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2020-02-05 Don Olmstead <don.olmstead@sony.com>
2+
3+
[PlayStation] Build a shared JavaScriptCore
4+
https://bugs.webkit.org/show_bug.cgi?id=198446
5+
6+
Reviewed by Fujii Hironori.
7+
8+
Compile bmalloc and WTF as OBJECT libraries that are then linked into a shared
9+
JavaScriptCore. Using OBJECT libraries is a modern CMake way to have the behavior
10+
of --whole-archive.
11+
12+
* Source/cmake/OptionsPlayStation.cmake:
13+
114
2020-02-04 Don Olmstead <don.olmstead@sony.com>
215

316
[PlayStation] Enable TestWebKit

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2020-02-05 Don Olmstead <don.olmstead@sony.com>
2+
3+
[PlayStation] Build a shared JavaScriptCore
4+
https://bugs.webkit.org/show_bug.cgi?id=198446
5+
6+
Reviewed by Fujii Hironori.
7+
8+
Add TARGET_OBJECTS for bmalloc and WTF so JavaScriptCore links. Add bmalloc and
9+
WTF compile definitions so exports are exposed.
10+
11+
* PlatformPlayStation.cmake:
12+
113
2020-02-05 Justin Michaud <justin_michaud@apple.com>
214

315
Deleting a property should not turn structures into uncacheable dictionaries

‎Source/JavaScriptCore/PlatformPlayStation.cmake‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,18 @@ set_source_files_properties(
4545
PROPERTIES LANGUAGE CXX
4646
)
4747

48-
if (${WTF_LIBRARY_TYPE} STREQUAL "STATIC")
49-
add_definitions(-DSTATICALLY_LINKED_WITH_WTF)
50-
endif ()
51-
5248
# This overrides the default x64 value of 1GB for the memory pool size
5349
add_definitions(-DFIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB=64)
50+
51+
# Both bmalloc and WTF are built as object libraries. The WebKit:: interface
52+
# targets are used. A limitation of that is the object files are not propagated
53+
# so they are added here.
54+
list(APPEND JavaScriptCore_PRIVATE_LIBRARIES
55+
$<TARGET_OBJECTS:WTF>
56+
$<TARGET_OBJECTS:bmalloc>
57+
)
58+
59+
list(APPEND JavaScriptCore_PRIVATE_DEFINITIONS
60+
STATICALLY_LINKED_WITH_WTF
61+
STATICALLY_LINKED_WITH_bmalloc
62+
)

‎Source/WTF/ChangeLog‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2020-02-05 Don Olmstead <don.olmstead@sony.com>
2+
3+
[PlayStation] Build a shared JavaScriptCore
4+
https://bugs.webkit.org/show_bug.cgi?id=198446
5+
6+
Reviewed by Fujii Hironori.
7+
8+
Add bmalloc definition when compiling WTF. Remove LanguageUnix.cpp since
9+
LanguagePlayStation.cpp is present which results in duplicate symbol definitions.
10+
11+
* wtf/PlatformPlayStation.cmake:
12+
113
2020-02-05 Yusuke Suzuki <ysuzuki@apple.com>
214

315
[WTF] Try using 75% load factor for HashTable

‎Source/WTF/wtf/PlatformPlayStation.cmake‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ list(APPEND WTF_SOURCES
1515
text/unix/TextBreakIteratorInternalICUUnix.cpp
1616

1717
unix/CPUTimeUnix.cpp
18-
unix/LanguageUnix.cpp
1918
)
2019

2120
list(APPEND WTF_LIBRARIES
@@ -24,3 +23,6 @@ list(APPEND WTF_LIBRARIES
2423
${C_STD_LIBRARY}
2524
${KERNEL_LIBRARY}
2625
)
26+
27+
# bmalloc is compiled as an OBJECT library so it is statically linked
28+
list(APPEND WTF_PRIVATE_DEFINITIONS STATICALLY_LINKED_WITH_bmalloc)

‎Source/cmake/OptionsPlayStation.cmake‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,20 @@ set(WebKit_DERIVED_SOURCES_DIR ${CMAKE_BINARY_DIR}/WebKit/DerivedSources)
164164
set(WTF_SCRIPTS_DIR ${CMAKE_BINARY_DIR}/WTF/Scripts)
165165
set(JavaScriptCore_SCRIPTS_DIR ${CMAKE_BINARY_DIR}/JavaScriptCore/Scripts)
166166

167-
# Override library types
168-
set(WTF_LIBRARY_TYPE STATIC)
169-
set(JavaScriptCore_LIBRARY_TYPE STATIC)
167+
# Create a shared JavaScriptCore with WTF and bmalloc exposed through it.
168+
#
169+
# Use OBJECT libraries for bmalloc and WTF. This is the modern CMake way to emulate
170+
# the behavior of --whole-archive. If this is not done then all the exports will
171+
# not be exposed.
172+
set(bmalloc_LIBRARY_TYPE OBJECT)
173+
set(WTF_LIBRARY_TYPE OBJECT)
174+
set(JavaScriptCore_LIBRARY_TYPE SHARED)
175+
176+
# For the shared WebKit just link a STATIC WebCore since the exports from WebCore
177+
# and PAL are not needed.
178+
set(PAL_LIBRARY_TYPE STATIC)
170179
set(WebCore_LIBRARY_TYPE STATIC)
180+
set(WebKit_LIBRARY_TYPE SHARED)
171181

172182
# Enable multi process builds for Visual Studio
173183
if (NOT ${CMAKE_GENERATOR} MATCHES "Ninja")

‎Tools/ChangeLog‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2020-02-05 Don Olmstead <don.olmstead@sony.com>
2+
3+
[PlayStation] Build a shared JavaScriptCore
4+
https://bugs.webkit.org/show_bug.cgi?id=198446
5+
6+
Reviewed by Fujii Hironori.
7+
8+
Add TARGET_OBJECTS for bmalloc and WTF so TestWTF links.
9+
10+
* TestWebKitAPI/PlatformPlayStation.cmake:
11+
112
2020-02-05 Stephan Szabo <stephan.szabo@sony.com>
213

314
[WinCairo] Set up fonts for layout tests for test bot image

‎Tools/TestWebKitAPI/PlatformPlayStation.cmake‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ list(APPEND TestWTF_SOURCES
1010
generic/UtilitiesGeneric.cpp
1111
)
1212

13+
# Both bmalloc and WTF are built as object libraries. The WebKit:: interface
14+
# targets are used. A limitation of that is the object files are not propagated
15+
# so they are added here.
16+
list(APPEND TestWTF_PRIVATE_LIBRARIES
17+
$<TARGET_OBJECTS:WTF>
18+
$<TARGET_OBJECTS:bmalloc>
19+
)
20+
1321
list(APPEND TestWebCore_SOURCES
1422
${test_main_SOURCES}
1523
)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL