[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 05:25:47 PDT 2020


mstorsjo added a comment.

In D89863#2344242 <https://reviews.llvm.org/D89863#2344242>, @ldionne wrote:

> Maybe we should actually add
>
>   #if defined(__clang__)
>   #  define _LIBCPPABI_COMPILER_CLANG
>   #  ifndef __apple_build_version__
>   #    define  _LIBCPPABI_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
>   #  endif
>   #elif defined(__GNUC__)
>   #  define  _LIBCPPABI_COMPILER_GCC
>   #elif defined(_MSC_VER)
>   #  define _LIBCPPABI_COMPILER_MSVC
>   #elif defined(__IBMCPP__)
>   #  define _LIBCPPABI_COMPILER_IBM
>   #endif
>
> As a follow-up we should de-duplicate this (and a lot of other stuff) between libc++ and libc++abi. But if we copy-paste it in that way, at least it makes it clear that the logic is intended to be the same when we try to de-duplicate in the future. WDYT?

Sure, that sounds good to me - but I'd use `_LIBCXXABI` as prefix as that's the spelling used within that lib, not `_LIBCPPABI`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89863



More information about the libcxx-commits mailing list