[libunwind] 547659a - [unwind] Don't link libpthread and libdl on Fuchsia
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 17 17:21:53 PST 2019
Author: Petr Hosek
Date: 2019-12-17T17:21:43-08:00
New Revision: 547659ae56f5827055f71b495d7b08c10badadb5
URL: https://github.com/llvm/llvm-project/commit/547659ae56f5827055f71b495d7b08c10badadb5
DIFF: https://github.com/llvm/llvm-project/commit/547659ae56f5827055f71b495d7b08c10badadb5.diff
LOG: [unwind] Don't link libpthread and libdl on Fuchsia
This is a follow up to D71135.
Added:
Modified:
libunwind/cmake/config-ix.cmake
Removed:
################################################################################
diff --git a/libunwind/cmake/config-ix.cmake b/libunwind/cmake/config-ix.cmake
index 0d833e996ca1..9c8089cfe215 100644
--- a/libunwind/cmake/config-ix.cmake
+++ b/libunwind/cmake/config-ix.cmake
@@ -71,10 +71,6 @@ endif()
# Check compiler flags
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)
@@ -84,3 +80,12 @@ if(LIBUNWIND_TARGET_ARM AND NOT LIBUNWIND_USES_SJLJ_EXCEPTIONS AND NOT LIBUNWIND
# This condition is copied from __libunwind_config.h
set(LIBUNWIND_USES_ARM_EHABI ON)
endif()
+
+# Check libraries
+if(FUCHSIA)
+ set(LIBUNWIND_HAS_DL_LIB NO)
+ set(LIBUNWIND_HAS_PTHREAD_LIB NO)
+else()
+ check_library_exists(dl dladdr "" LIBUNWIND_HAS_DL_LIB)
+ check_library_exists(pthread pthread_once "" LIBUNWIND_HAS_PTHREAD_LIB)
+endif()
More information about the cfe-commits
mailing list