[compiler-rt] Reapply [compiler-rt] Check for and use -lunwind when linking with -nodefaultlibs (PR #66584)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 00:55:25 PDT 2023


================
@@ -63,6 +63,16 @@ if (C_SUPPORTS_NODEFAULTLIBS_FLAG)
                         moldname mingwex msvcrt)
     list(APPEND CMAKE_REQUIRED_LIBRARIES ${MINGW_LIBRARIES})
   endif()
+  if (NOT TARGET unwind)
+    # Don't check for a library named unwind, if there's a target with that name within
+    # the same build.
+    check_library_exists(unwind _Unwind_RaiseException "" COMPILER_RT_HAS_LIBUNWIND)
----------------
s-barannikov wrote:

Can this use a different symbol? This symbol does not exist when SJLJ exceptions are enabled.

https://github.com/llvm/llvm-project/pull/66584


More information about the llvm-commits mailing list