Copy over the compiler detection structure from libcxx, and set _LIBCXXABI_WEAK like _LIBCPP_WEAK is set in libcxx.
This allows users to override operator new/delete, if using those operators from libcxxabi instead of from libcxx.
Differential D89863
[libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers mstorsjo on Oct 21 2020, 3:45 AM. Authored by
Details
Copy over the compiler detection structure from libcxx, and set _LIBCXXABI_WEAK like _LIBCPP_WEAK is set in libcxx. This allows users to override operator new/delete, if using those operators from libcxxabi instead of from libcxx.
Diff Detail
Event TimelineComment Actions 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? Comment Actions Sure, that sounds good to me - but I'd use _LIBCXXABI as prefix as that's the spelling used within that lib, not _LIBCPPABI. Comment Actions Copied over the compiler detection logic from libcxx, to make them match more clearly. |