summaryrefslogtreecommitdiff
path: root/libunwind/cmake
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2019-12-04 09:22:08 +0200
committerMartin Storsjö <martin@martin.st>2019-12-04 09:29:15 +0200
commit938c70b86c7d2165f8c28d5700e9c1ac1263307e (patch)
tree0838a0470e9bf5d4b0650b18be0c2e4a6643c61d /libunwind/cmake
parent2f1e7b3d01e176e912477d52847c19d3847a43a0 (diff)
downloadllvm-938c70b86c7d2165f8c28d5700e9c1ac1263307e.tar.gz
Revert "Enable `-funwind-tables` flag when building libunwind"
This reverts commit b3fdf33ba6aa7ef80621696f74aaf2f6f8e1d1de. This change broke building libunwind for Windows/MinGW, and broke on aspect of the CMake tests in libunwind in general. After set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY), CMake skips the linking step in tests, but cmake/config-ix.cmake also does a few checks for functions in libraries (looking for whether -lc provides fopen and whether -ldl provides dladdr). As CMake only tests building a static library, these tests incorrectly succeed and CMake concludes "Looking for fopen in c - found" and "Looking for dladdr in dl - found", while building then fails at the end with errors about unable to find -lc and -ldl.
Diffstat (limited to 'libunwind/cmake')
-rw-r--r--libunwind/cmake/config-ix.cmake11
1 files changed, 0 insertions, 11 deletions
diff --git a/libunwind/cmake/config-ix.cmake b/libunwind/cmake/config-ix.cmake
index 0d833e996ca1..02d2f13f2e28 100644
--- a/libunwind/cmake/config-ix.cmake
+++ b/libunwind/cmake/config-ix.cmake
@@ -2,7 +2,6 @@ include(CMakePushCheckState)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CheckLibraryExists)
-include(CheckSymbolExists)
include(CheckCSourceCompiles)
check_library_exists(c fopen "" LIBUNWIND_HAS_C_LIB)
@@ -74,13 +73,3 @@ check_cxx_compiler_flag(-nostdinc++ LIBUNWIND_HAS_NOSTDINCXX_FLAG)
# Check libraries
check_library_exists(dl dladdr "" LIBUNWIND_HAS_DL_LIB)
check_library_exists(pthread pthread_once "" LIBUNWIND_HAS_PTHREAD_LIB)
-
-# Check symbols
-check_symbol_exists(__arm__ "" LIBUNWIND_TARGET_ARM)
-check_symbol_exists(__USING_SJLJ_EXCEPTIONS__ "" LIBUNWIND_USES_SJLJ_EXCEPTIONS)
-check_symbol_exists(__ARM_DWARF_EH__ "" LIBUNWIND_USES_DWARF_EH)
-
-if(LIBUNWIND_TARGET_ARM AND NOT LIBUNWIND_USES_SJLJ_EXCEPTIONS AND NOT LIBUNWIND_USES_DWARF_EH)
- # This condition is copied from __libunwind_config.h
- set(LIBUNWIND_USES_ARM_EHABI ON)
-endif()