From 4105d565d3365f554b969a8f7fc6478cbb64f477 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Wed, 8 Feb 2017 16:33:23 +0100 Subject: [PATCH] disable WEBP_USE_XXX optimisations when EMSCRIPTEN is defined Currently, none are available. If WEBP_HAVE_SSE2 eventually works, we'll have to refine this conditionals. BUG=webp:261 Change-Id: Ibc63ee1c013f2a4169eeb85cc8b6317b6420c2ad --- src/dsp/dsp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h index 813fed4a..ccb9df7b 100644 --- a/src/dsp/dsp.h +++ b/src/dsp/dsp.h @@ -42,6 +42,9 @@ extern "C" { # define __has_builtin(x) 0 #endif +// for now, none of the optimizations below are available in emscripten +#if !defined(EMSCRIPTEN) + #if defined(_MSC_VER) && _MSC_VER > 1310 && \ (defined(_M_X64) || defined(_M_IX86)) #define WEBP_MSC_SSE2 // Visual C++ SSE2 targets @@ -100,6 +103,8 @@ extern "C" { #define WEBP_USE_MSA #endif +#endif /* EMSCRIPTEN */ + // This macro prevents thread_sanitizer from reporting known concurrent writes. #define WEBP_TSAN_IGNORE_FUNCTION #if defined(__has_feature)