[libcxx-commits] [PATCH] D89863: [libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 21 23:12:07 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5449ea9f90ea: [libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89863/new/

https://reviews.llvm.org/D89863

Files:
  libcxxabi/include/__cxxabi_config.h


Index: libcxxabi/include/__cxxabi_config.h
===================================================================
--- libcxxabi/include/__cxxabi_config.h
+++ libcxxabi/include/__cxxabi_config.h
@@ -18,6 +18,19 @@
 #define __has_attribute(_attribute_) 0
 #endif
 
+#if defined(__clang__)
+#  define _LIBCXXABI_COMPILER_CLANG
+#  ifndef __apple_build_version__
+#    define _LIBCXXABI_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
+#  endif
+#elif defined(__GNUC__)
+#  define _LIBCXXABI_COMPILER_GCC
+#elif defined(_MSC_VER)
+#  define _LIBCXXABI_COMPILER_MSVC
+#elif defined(__IBMCPP__)
+#  define _LIBCXXABI_COMPILER_IBM
+#endif
+
 #if defined(_WIN32)
  #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
   #define _LIBCXXABI_HIDDEN
@@ -53,7 +66,7 @@
  #endif
 #endif
 
-#if defined(_WIN32)
+#if defined(_LIBCXXABI_COMPILER_MSVC)
 #define _LIBCXXABI_WEAK
 #else
 #define _LIBCXXABI_WEAK __attribute__((__weak__))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89863.299874.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201022/f78565d5/attachment.bin>


More information about the libcxx-commits mailing list