diff options
| author | Ed Maste <emaste@freebsd.org> | 2017-04-12 13:51:00 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@freebsd.org> | 2017-04-12 13:51:00 +0000 |
| commit | e544379b30cc103d5cb8f406516f848a0004ca31 (patch) | |
| tree | a3ec045b0cae6a05950af59d56af0459bf73e9f6 /llvm/cmake/config-ix.cmake | |
| parent | 22776892c9aad3cedd2f3692d324ff45af1b29fb (diff) | |
| download | bcm5719-llvm-e544379b30cc103d5cb8f406516f848a0004ca31.tar.gz bcm5719-llvm-e544379b30cc103d5cb8f406516f848a0004ca31.zip | |
Fix detection of backtrace() availability on FreeBSD
On FreeBSD backtrace is not part of libc and depends on libexecinfo
being available. Instead of using manual checks we can use the builtin
CMake module FindBacktrace.cmake to detect availability of backtrace()
in a portable way.
Patch By: Alex Richardson
Differential Revision: https://reviews.llvm.org/D27143
llvm-svn: 300062
Diffstat (limited to 'llvm/cmake/config-ix.cmake')
| -rwxr-xr-x | llvm/cmake/config-ix.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake index e5050018046..0331d0fa10a 100755 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake @@ -46,7 +46,6 @@ endfunction() check_include_file(dirent.h HAVE_DIRENT_H) check_include_file(dlfcn.h HAVE_DLFCN_H) check_include_file(errno.h HAVE_ERRNO_H) -check_include_file(execinfo.h HAVE_EXECINFO_H) check_include_file(fcntl.h HAVE_FCNTL_H) check_include_file(inttypes.h HAVE_INTTYPES_H) check_include_file(link.h HAVE_LINK_H) @@ -165,7 +164,9 @@ endif() # function checks check_symbol_exists(arc4random "stdlib.h" HAVE_DECL_ARC4RANDOM) -check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) +find_package(Backtrace) +set(HAVE_BACKTRACE ${Backtrace_FOUND}) +set(BACKTRACE_HEADER ${Backtrace_HEADER}) check_symbol_exists(_Unwind_Backtrace "unwind.h" HAVE__UNWIND_BACKTRACE) check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE) check_symbol_exists(sysconf unistd.h HAVE_SYSCONF) |

