Skip to content

[flang][runtime] Make sure to link libexecinfo if it exists #125344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions flang/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
)
endif()

set(linked_libraries FortranDecimal)

# function checks
find_package(Backtrace)
set(HAVE_BACKTRACE ${Backtrace_FOUND})
set(BACKTRACE_HEADER ${Backtrace_HEADER})
if(HAVE_BACKTRACE)
list(APPEND linked_libraries ${Backtrace_LIBRARY})
endif()

include(CheckCXXSymbolExists)
include(CheckCXXSourceCompiles)
Expand Down Expand Up @@ -271,15 +276,15 @@ if (NOT DEFINED MSVC)
add_flang_library(FortranRuntime
${sources}
LINK_LIBS
FortranDecimal
${linked_libraries}

INSTALL_WITH_TOOLCHAIN
)
else()
add_flang_library(FortranRuntime
${sources}
LINK_LIBS
FortranDecimal
${linked_libraries}
)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
add_flang_library(FortranRuntime.static ${sources}
Expand Down