Author: ericwf Date: Fri Jan 6 20:43:58 2017 New Revision: 291329 URL: http://llvm.org/viewvc/llvm-project?rev=291329&view=rev Log: Add _LIBCPP_ABI_[ITANIUM|MICROSOFT] macros.
This patch adds a libc++ configuration macro for the ABI we are targeting, either Itanium or Microsoft. For now we configure for the Microsoft ABI when on Windows with a compiler that defines _MSC_VER. However this is only temporary until Clang implements builtin macros we can use. Modified: libcxx/trunk/include/__config Modified: libcxx/trunk/include/__config URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=291329&r1=291328&r2=291329&view=diff ============================================================================== --- libcxx/trunk/include/__config (original) +++ libcxx/trunk/include/__config Fri Jan 6 20:43:58 2017 @@ -111,6 +111,15 @@ #define _LIBCPP_COMPILER_IBM #endif +// FIXME: ABI detection should be done via compiler builtin macros. This +// is just a placeholder until Clang implements such macros. For now assume +// that Windows compilers pretending to be MSVC++ target the microsoft ABI. +#if defined(_WIN32) && defined(_MSC_VER) +# define _LIBCPP_ABI_MICROSOFT +#else +# define _LIBCPP_ABI_ITANIUM +#endif + // Need to detect which libc we're using if we're on Linux. #if defined(__linux__) #include <features.h> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits