Title: [295034] trunk
- Revision
- 295034
- Author
- [email protected]
- Date
- 2022-05-30 15:03:33 -0700 (Mon, 30 May 2022)
Log Message
WebKitTestRunner shouldn't link object files of _javascript_Core and WebCore
https://bugs.webkit.org/show_bug.cgi?id=241002
Reviewed by Don Olmstead.
243269@main removed `WebKit` from `WebKitTestRunner_FRAMEWORKS` for
WPE. But, it should be there not to link object files of
_javascript_Core and WebCore to WebKitTestRunner. In WPE builds,
_javascript_Core and WebCore API are exported from WebKit shared
library. WebKit consumers shouldn't link with object files of
_javascript_Core and WebCore.
However, adding `WebKit` to `WebKitTestRunner_FRAMEWORKS` introduced a
new problem that the object file of LowLevelInterpreter.cpp was linked
into WebKitTestRunner. This problem was fixed by changing
LowLevelInterpreterLib to a STATIC library.
* Source/_javascript_Core/CMakeLists.txt:
* Tools/WebKitTestRunner/CMakeLists.txt:
* Tools/WebKitTestRunner/PlatformGTK.cmake:
* Tools/WebKitTestRunner/PlatformWin.cmake:
Canonical link: https://commits.webkit.org/251129@main
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (295033 => 295034)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2022-05-30 21:59:54 UTC (rev 295033)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2022-05-30 22:03:33 UTC (rev 295034)
@@ -463,7 +463,7 @@
COMMAND ${MASM_EXECUTABLE} ${LLINT_MASM_FLAGS} ${_javascript_Core_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj ${_javascript_Core_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.asm
VERBATIM)
list(APPEND _javascript_Core_SOURCES ${_javascript_Core_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj)
- add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp)
+ add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp)
else ()
# As there's poor toolchain support for using `.file` directives in
# inline asm (i.e. there's no way to avoid clashes with the `.file`
@@ -472,7 +472,7 @@
# an object file. We only need to do this for LowLevelInterpreter.cpp
# and cmake doesn't allow us to introduce a compiler wrapper for a
# single source file, so we need to create a separate target for it.
- add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp
+ add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp
${_javascript_Core_DERIVED_SOURCES_DIR}/${LLIntOutput})
endif ()
@@ -1489,13 +1489,7 @@
COMPILE_OPTIONS "-fno-lto")
endif ()
-# When building _javascript_Core as an object library, we need to make sure the
-# lowlevelinterpreter lib objects get propogated.
-if (${_javascript_Core_LIBRARY_TYPE} STREQUAL "OBJECT")
- list(APPEND _javascript_Core_PRIVATE_LIBRARIES $<TARGET_OBJECTS:LowLevelInterpreterLib>)
-else ()
- list(APPEND _javascript_Core_SOURCES $<TARGET_OBJECTS:LowLevelInterpreterLib>)
-endif ()
+list(APPEND _javascript_Core_PRIVATE_LIBRARIES LowLevelInterpreterLib)
WEBKIT_COMPUTE_SOURCES(_javascript_Core)
WEBKIT_FRAMEWORK(_javascript_Core)
Modified: trunk/Tools/WebKitTestRunner/CMakeLists.txt (295033 => 295034)
--- trunk/Tools/WebKitTestRunner/CMakeLists.txt 2022-05-30 21:59:54 UTC (rev 295033)
+++ trunk/Tools/WebKitTestRunner/CMakeLists.txt 2022-05-30 22:03:33 UTC (rev 295034)
@@ -26,6 +26,7 @@
_javascript_Core
WebCore
WebCoreTestSupport
+ WebKit
)
if (COMPILER_IS_GCC_OR_CLANG)
Modified: trunk/Tools/WebKitTestRunner/PlatformGTK.cmake (295033 => 295034)
--- trunk/Tools/WebKitTestRunner/PlatformGTK.cmake 2022-05-30 21:59:54 UTC (rev 295033)
+++ trunk/Tools/WebKitTestRunner/PlatformGTK.cmake 2022-05-30 22:03:33 UTC (rev 295034)
@@ -33,10 +33,6 @@
GTK::GTK
)
-list(APPEND WebKitTestRunner_FRAMEWORKS
- WebKit
-)
-
list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
InjectedBundle/atspi/AccessibilityControllerAtspi.cpp
InjectedBundle/atspi/AccessibilityNotificationHandler.cpp
Modified: trunk/Tools/WebKitTestRunner/PlatformWin.cmake (295033 => 295034)
--- trunk/Tools/WebKitTestRunner/PlatformWin.cmake 2022-05-30 21:59:54 UTC (rev 295033)
+++ trunk/Tools/WebKitTestRunner/PlatformWin.cmake 2022-05-30 22:03:33 UTC (rev 295034)
@@ -30,10 +30,6 @@
Oleacc
)
-list(APPEND WebKitTestRunner_FRAMEWORKS
- WebKit
-)
-
list(APPEND WebKitTestRunnerInjectedBundle_LIBRARIES
$<TARGET_OBJECTS:WebCoreTestSupport>
)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes