From 54e78d12e04c74476b8330018923cd22f9e0ab42 Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Sat, 2 May 2015 01:00:01 +0000 Subject: [PATCH] make windows code built with clangcl include the _posix source code. depot_tools excludes these source files now, so they need to be manually included. BUG=435 TESTED=clangcl local build on windows R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/52419004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1396 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- source/compare_win.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/compare_win.cc b/source/compare_win.cc index 603849374..2ca98cd72 100644 --- a/source/compare_win.cc +++ b/source/compare_win.cc @@ -16,8 +16,12 @@ namespace libyuv { extern "C" { #endif -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ - defined(_MSC_VER) && !defined(__clang__) +#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) + +// ClangCL use posix source instead. +#if defined(__clang__) +#include "source/compare_posix.cc" +#else __declspec(naked) uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count) { @@ -221,6 +225,7 @@ uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed) { } #endif // _MSC_VER >= 1700 +#endif // defined(__clang__) #endif // !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) ... #ifdef __cplusplus