aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkOpts_hsw.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-11-22 08:57:45 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-28 15:40:23 +0000
commite9f78b41c65a78400c22a1b79007b1b9e187a745 (patch)
tree3cb9ebe104fd4242701286150d9b02d068f754f4 /src/opts/SkOpts_hsw.cpp
parent6762dd6f73ec6a0bea0683175d1cf4568680bee4 (diff)
Guard against buggy ucrt\math.h.
BUG=666707 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5089 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I3bebfdf635d541d92fb84236f0f6fae2da39d691 Reviewed-on: https://skia-review.googlesource.com/5089 Reviewed-by: Bruce Dawson <brucedawson@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/opts/SkOpts_hsw.cpp')
-rw-r--r--src/opts/SkOpts_hsw.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opts/SkOpts_hsw.cpp b/src/opts/SkOpts_hsw.cpp
index 8c31af5b83..96465b8a07 100644
--- a/src/opts/SkOpts_hsw.cpp
+++ b/src/opts/SkOpts_hsw.cpp
@@ -5,11 +5,16 @@
* found in the LICENSE file.
*/
+#include "SkSafe_math.h" // Keep this first.
#include "SkOpts.h"
#define SK_OPTS_NS hsw
#include "SkRasterPipeline_opts.h"
+#if defined(_INC_MATH) && !defined(INC_MATH_IS_SAFE_NOW)
+ #error We have included ucrt\math.h without protecting it against ODR violation.
+#endif
+
namespace SkOpts {
void Init_hsw() {
compile_pipeline = hsw::compile_pipeline;