mathutil: Enable usage of builtins for MinGW GCC too

See:
https://invent.kde.org/graphics/krita/-/blob/master/3rdparty/ext_googleangle/02-patches_krita/0011-Fix-MinGW-build.patch

Co-authored-by: Alvin Wong <alvinhochun@gmail.com>
Bug: None
Change-Id: I9663a11d62a61674b361fc46eeb53b3c3096ccbd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4637585
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: L. E. Segovia <amy@amyspark.me>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
This commit is contained in:
L. E. Segovia
2022-03-10 16:25:34 +08:00
committed by Angle LUCI CQ
parent bc2d5ed01f
commit 566f1ee465

View File

@@ -1111,7 +1111,7 @@ inline int BitCount(uint64_t bits)
# endif // defined(_M_IX86) || defined(_M_X64)
#endif // defined(_MSC_VER) && !defined(__clang__)
#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__)
#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__GNUC__)
inline int BitCount(uint32_t bits)
{
return __builtin_popcount(bits);
@@ -1121,7 +1121,7 @@ inline int BitCount(uint64_t bits)
{
return __builtin_popcountll(bits);
}
#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__)
#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__GNUC__)
inline int BitCount(uint8_t bits)
{