Title: [295340] releases/WebKitGTK/webkit-2.36
Revision
295340
Author
[email protected]
Date
2022-06-07 04:42:55 -0700 (Tue, 07 Jun 2022)

Log Message

Merge r295034 - 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: releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/CMakeLists.txt (295339 => 295340)


--- releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/CMakeLists.txt	2022-06-07 11:42:44 UTC (rev 295339)
+++ releases/WebKitGTK/webkit-2.36/Source/_javascript_Core/CMakeLists.txt	2022-06-07 11:42:55 UTC (rev 295340)
@@ -456,7 +456,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`
@@ -465,7 +465,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 ()
 
@@ -1496,13 +1496,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)
 list(APPEND _javascript_Core_SOURCES

Modified: releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/CMakeLists.txt (295339 => 295340)


--- releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/CMakeLists.txt	2022-06-07 11:42:44 UTC (rev 295339)
+++ releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/CMakeLists.txt	2022-06-07 11:42:55 UTC (rev 295340)
@@ -26,6 +26,7 @@
     _javascript_Core
     WebCore
     WebCoreTestSupport
+    WebKit
 )
 
 if (COMPILER_IS_GCC_OR_CLANG)

Modified: releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/PlatformGTK.cmake (295339 => 295340)


--- releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/PlatformGTK.cmake	2022-06-07 11:42:44 UTC (rev 295339)
+++ releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/PlatformGTK.cmake	2022-06-07 11:42:55 UTC (rev 295340)
@@ -35,10 +35,6 @@
     GTK::GTK
 )
 
-list(APPEND WebKitTestRunner_FRAMEWORKS
-    WebKit
-)
-
 list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
     InjectedBundle/atk/AccessibilityControllerAtk.cpp
     InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp

Modified: releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/PlatformWin.cmake (295339 => 295340)


--- releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/PlatformWin.cmake	2022-06-07 11:42:44 UTC (rev 295339)
+++ releases/WebKitGTK/webkit-2.36/Tools/WebKitTestRunner/PlatformWin.cmake	2022-06-07 11:42:55 UTC (rev 295340)
@@ -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

Reply via email to