diff options
author | bsalomon <bsalomon@google.com> | 2016-07-08 03:28:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-08 03:28:42 -0700 |
commit | f48c62fa6ae703f0e4fa7b97a381eb06afaadc4b (patch) | |
tree | 2966f03f7663c8d4fae317aebe9b76e9f9b7c374 /include/core | |
parent | 00ee2a8482e1b910658606d1643324634ffc1ed0 (diff) |
Promote the GCC/libc++/<memory> 'typedef float float32_t' workaround to SkTypes.h
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2135453002
Review-Url: https://codereview.chromium.org/2135453002
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkTypes.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 4e95c69f32..b38268231d 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -9,6 +9,22 @@ #define SkTypes_DEFINED // IWYU pragma: begin_exports + +// In at least two known scenarios when using GCC with libc++: +// * GCC 4.8 targeting ARMv7 with NEON +// * GCC 4.9 targeting ARMv8 64 bit +// we need to typedef float float32_t (or include <arm_neon.h> which does that) +// before #including <memory>. This makes no sense. I'm not very interested in +// understanding why... these are old, bizarre platform configuration that we +// should just let die. +#include <ciso646> // Include something innocuous to define _LIBCPP_VERISON if it's libc++. +#if defined(__GNUC__) && __GNUC__ == 4 \ + && ((defined(SK_CPU_ARM32) && defined(SK_ARM_HAS_NEON)) || defined(SK_CPU_ARM64)) \ + && defined(_LIBCPP_VERSION) + typedef float float32_t; + #include <memory> +#endif + #include "SkPreConfig.h" #include "SkUserConfig.h" #include "SkPostConfig.h" |