[libcxx-commits] [PATCH] D71641: [unwind] Don't link libpthread and libdl on Fuchsia

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 17 17:20:37 PST 2019


phosek created this revision.
phosek added a reviewer: leonardchan.
Herald added subscribers: libcxx-commits, jfb, christof, mgorny.
Herald added a project: libc++.

This is a follow up to D71135 <https://reviews.llvm.org/D71135>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71641

Files:
  libunwind/cmake/config-ix.cmake


Index: libunwind/cmake/config-ix.cmake
===================================================================
--- libunwind/cmake/config-ix.cmake
+++ libunwind/cmake/config-ix.cmake
@@ -71,10 +71,6 @@
 # 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 @@
   # 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()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71641.234422.patch
Type: text/x-patch
Size: 970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20191218/23a12194/attachment.bin>


More information about the libcxx-commits mailing list