Title: [288718] trunk
Revision
288718
Author
[email protected]
Date
2022-01-27 17:23:39 -0800 (Thu, 27 Jan 2022)

Log Message

[CMake] Do not require GNU Gold usage to enable DEBUG_FISSION
https://bugs.webkit.org/show_bug.cgi?id=235737

Reviewed by Michael Catanzaro.

* Source/cmake/OptionsCommon.cmake: Allow enabling DEBUG_FISSION with any linker.

Modified Paths

Diff

Modified: trunk/ChangeLog (288717 => 288718)


--- trunk/ChangeLog	2022-01-28 01:08:04 UTC (rev 288717)
+++ trunk/ChangeLog	2022-01-28 01:23:39 UTC (rev 288718)
@@ -1,3 +1,12 @@
+2022-01-27  Adrian Perez de Castro  <[email protected]>
+
+        [CMake] Do not require GNU Gold usage to enable DEBUG_FISSION
+        https://bugs.webkit.org/show_bug.cgi?id=235737
+
+        Reviewed by Michael Catanzaro.
+
+        * Source/cmake/OptionsCommon.cmake: Allow enabling DEBUG_FISSION with any linker.
+
 2022-01-27  Yusuke Suzuki  <[email protected]>
 
         Add .clangd similar to .ccls

Modified: trunk/Source/cmake/OptionsCommon.cmake (288717 => 288718)


--- trunk/Source/cmake/OptionsCommon.cmake	2022-01-28 01:08:04 UTC (rev 288717)
+++ trunk/Source/cmake/OptionsCommon.cmake	2022-01-28 01:23:39 UTC (rev 288718)
@@ -73,7 +73,7 @@
 endif ()
 
 set(ENABLE_DEBUG_FISSION_DEFAULT OFF)
-if (USE_LD_GOLD AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
     check_cxx_compiler_flag(-gsplit-dwarf CXX_COMPILER_SUPPORTS_GSPLIT_DWARF)
     if (CXX_COMPILER_SUPPORTS_GSPLIT_DWARF)
         set(ENABLE_DEBUG_FISSION_DEFAULT ON)
@@ -83,13 +83,14 @@
 option(DEBUG_FISSION "Use Debug Fission support" ${ENABLE_DEBUG_FISSION_DEFAULT})
 
 if (DEBUG_FISSION)
-    if (NOT USE_LD_GOLD)
-        message(FATAL_ERROR "Need GNU gold linker for Debug Fission support")
-    endif ()
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gsplit-dwarf")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gsplit-dwarf")
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index")
-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index")
+
+    # The ld.bfd linker does not support --gdb-index, possibly others as well.
+    if (USE_LD_GOLD OR USE_LD_LLD)
+        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index")
+        set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index")
+    endif ()
 endif ()
 
 set(GCC_OFFLINEASM_SOURCE_MAP_DEFAULT OFF)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to