[llvm-branch-commits] [flang] release/20.x: [flang][runtime] Make sure to link libexecinfo if it exists (#125344) (PR #125515)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Feb 3 07:11:35 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-runtime
Author: None (llvmbot)
<details>
<summary>Changes</summary>
Backport cb2598dda1aae5096a77bc8a9f6679ca1b350e5e
Requested by: @<!-- -->brad0
---
Full diff: https://github.com/llvm/llvm-project/pull/125515.diff
1 Files Affected:
- (modified) flang/runtime/CMakeLists.txt (+7-2)
``````````diff
diff --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt
index fbfaae9a8806486..bf27a121e4d174c 100644
--- a/flang/runtime/CMakeLists.txt
+++ b/flang/runtime/CMakeLists.txt
@@ -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)
@@ -271,7 +276,7 @@ if (NOT DEFINED MSVC)
add_flang_library(FortranRuntime
${sources}
LINK_LIBS
- FortranDecimal
+ ${linked_libraries}
INSTALL_WITH_TOOLCHAIN
)
@@ -279,7 +284,7 @@ else()
add_flang_library(FortranRuntime
${sources}
LINK_LIBS
- FortranDecimal
+ ${linked_libraries}
)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
add_flang_library(FortranRuntime.static ${sources}
``````````
</details>
https://github.com/llvm/llvm-project/pull/125515
More information about the llvm-branch-commits
mailing list