[PATCH] D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD
Bryan Drewery via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 17:11:04 PST 2018
bdrewery added a comment.
This fixes it for me in the spirit of other library lookups (in that it doesn't bother with `-L`, but that could easily be added in). Despite `Backtrace_LIBRARIES` being plural I don't think it ever will be looking over //FindBacktrace.cmake//.
I have no clue about static linkage here.
https://people.freebsd.org/~bdrewery/patches/cmake-libexecinfo.diff
diff --git lib/Support/CMakeLists.txt lib/Support/CMakeLists.txt
index 5723f8fcf5b..dfbdd70701f 100644
--- lib/Support/CMakeLists.txt
+++ lib/Support/CMakeLists.txt
@@ -13,7 +13,9 @@ elseif( CMAKE_HOST_UNIX )
set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
endif()
if( HAVE_BACKTRACE )
- set(system_libs ${system_libs} ${Backtrace_LIBRARIES})
+ get_filename_component(Backtrace_LIBFILE ${Backtrace_LIBRARIES} NAME_WE)
+ STRING(REGEX REPLACE "^lib" "" Backtrace_LIBFILE ${Backtrace_LIBFILE})
+ set(system_libs ${system_libs} ${Backtrace_LIBFILE})
endif()
if(LLVM_ENABLE_TERMINFO)
if(HAVE_TERMINFO)
Repository:
rL LLVM
https://reviews.llvm.org/D42702
More information about the llvm-commits
mailing list