fix-build.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From f20bac21ea37991c1a1110e78846897a406932f0 Mon Sep 17 00:00:00 2001
  2. From: Michael Catanzaro <mcatanzaro@redhat.com>
  3. Date: Tue, 5 Jul 2022 08:23:12 -0500
  4. Subject: [PATCH] Revert "Merge r295034 - WebKitTestRunner shouldn't link
  5. object files of JavaScriptCore and WebCore"
  6. This reverts commit 7916fda00b347ff263fbfe72c065032d1d9b523c.
  7. ---
  8. Source/JavaScriptCore/CMakeLists.txt | 12 +++++++++---
  9. Tools/WebKitTestRunner/CMakeLists.txt | 1 -
  10. Tools/WebKitTestRunner/PlatformGTK.cmake | 4 ++++
  11. Tools/WebKitTestRunner/PlatformWin.cmake | 4 ++++
  12. 4 files changed, 17 insertions(+), 4 deletions(-)
  13. diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
  14. index 95a1300ce1b3..238208eb1137 100644
  15. --- a/Source/JavaScriptCore/CMakeLists.txt
  16. +++ b/Source/JavaScriptCore/CMakeLists.txt
  17. @@ -456,7 +456,7 @@ if (MSVC AND NOT ENABLE_C_LOOP)
  18. COMMAND ${MASM_EXECUTABLE} ${LLINT_MASM_FLAGS} ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.asm
  19. VERBATIM)
  20. list(APPEND JavaScriptCore_SOURCES ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj)
  21. - add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp)
  22. + add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp)
  23. else ()
  24. # As there's poor toolchain support for using `.file` directives in
  25. # inline asm (i.e. there's no way to avoid clashes with the `.file`
  26. @@ -465,7 +465,7 @@ else ()
  27. # an object file. We only need to do this for LowLevelInterpreter.cpp
  28. # and cmake doesn't allow us to introduce a compiler wrapper for a
  29. # single source file, so we need to create a separate target for it.
  30. - add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp
  31. + add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp
  32. ${JavaScriptCore_DERIVED_SOURCES_DIR}/${LLIntOutput})
  33. endif ()
  34. @@ -1496,7 +1496,13 @@ if (CMAKE_COMPILER_IS_GNUCXX AND GCC_OFFLINEASM_SOURCE_MAP)
  35. COMPILE_OPTIONS "-fno-lto")
  36. endif ()
  37. -list(APPEND JavaScriptCore_PRIVATE_LIBRARIES LowLevelInterpreterLib)
  38. +# When building JavaScriptCore as an object library, we need to make sure the
  39. +# lowlevelinterpreter lib objects get propogated.
  40. +if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "OBJECT")
  41. + list(APPEND JavaScriptCore_PRIVATE_LIBRARIES $<TARGET_OBJECTS:LowLevelInterpreterLib>)
  42. +else ()
  43. + list(APPEND JavaScriptCore_SOURCES $<TARGET_OBJECTS:LowLevelInterpreterLib>)
  44. +endif ()
  45. WEBKIT_COMPUTE_SOURCES(JavaScriptCore)
  46. list(APPEND JavaScriptCore_SOURCES
  47. --
  48. 2.36.1