Skip to content

Commit 6f9a37f

Browse files
Mike KleinSkia Commit-Bot
authored andcommitted
test _MSC_VER in SkCpu
We're looking to use tools provided by the compiler toolchain, not by the OS, so the proper check is for MSVC (or compatible clang-cl) not for Windows. E.g. MinGW wants the #else path. Change-Id: Iefc43a857a1f6438c9145d7503a42c0646c5cbf1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270096 Auto-Submit: Mike Klein <mtklein@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
1 parent d11ae2e commit 6f9a37f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/SkCpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "src/core/SkCpu.h"
1212

1313
#if defined(SK_CPU_X86)
14-
#if defined(SK_BUILD_FOR_WIN)
14+
#if defined(_MSC_VER)
1515
#include <intrin.h>
1616
static void cpuid (uint32_t abcd[4]) { __cpuid ((int*)abcd, 1); }
1717
static void cpuid7(uint32_t abcd[4]) { __cpuidex((int*)abcd, 7, 0); }

0 commit comments

Comments
 (0)