Commit 9c2293af authored by Abseil Team's avatar Abseil Team Committed by Andy Soffer
Browse files

Googletest export

Fix build for MinGW + clang

In [1], empty_bases "is only supported when using the Microsoft C++ ABI." Disable it for MinGW.

https://clang.llvm.org/docs/AttributeReference.html#empty-bases

PiperOrigin-RevId: 356373782
parent 36b77920
...@@ -97,7 +97,8 @@ constexpr bool HasStrictnessModifier() { ...@@ -97,7 +97,8 @@ constexpr bool HasStrictnessModifier() {
// deregistration. This guarantees that MockClass's constructor and destructor // deregistration. This guarantees that MockClass's constructor and destructor
// run with the same level of strictness as its instance methods. // run with the same level of strictness as its instance methods.
#if GTEST_OS_WINDOWS && (defined(_MSC_VER) || defined(__clang__)) #if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW && \
(defined(_MSC_VER) || defined(__clang__))
// We need to mark these classes with this declspec to ensure that // We need to mark these classes with this declspec to ensure that
// the empty base class optimization is performed. // the empty base class optimization is performed.
#define GTEST_INTERNAL_EMPTY_BASE_CLASS __declspec(empty_bases) #define GTEST_INTERNAL_EMPTY_BASE_CLASS __declspec(empty_bases)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment