1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-09 16:05:58 +03:00

Enable -gdb-index when building mold

This commit is contained in:
Rui Ueyama 2023-01-07 17:26:04 +08:00
parent 14fe1ba070
commit 9f5b7e278f

View File

@ -52,7 +52,7 @@ include(GNUInstallDirs)
# Build mold itself using mold if -DMOLD_USE_MOLD=ON
option(MOLD_USE_MOLD "Use mold to build mold" OFF)
if(MOLD_USE_MOLD)
add_link_options(-fuse-ld=mold)
add_link_options(-fuse-ld=mold -Wl,-gdb-index)
endif()
add_executable(mold)
@ -65,7 +65,8 @@ if(NOT "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC")
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-Wno-sign-compare
-Wno-unused-function)
-Wno-unused-function
-ggnu-pubnames)
endif()
# Build mold with -flto if -DMOLD_LTO=ON