Browse Source

libobs: Restrict emmintrin.h to x86(_64) platform

There is a new toolchain called ARM64EC on MSVC which allows linking x64 objects to ARM64 objects.

It defines multiple architecture preprocessor definition including but not limited to `_M_X64`, `_M_ARM64` and `_M_ARM64EC`.

The original implementation will fail if compiling to ARM64EC.
Tommy Vercetti 4 years ago
parent
commit
aed2211dcd
1 changed files with 3 additions and 1 deletions
  1. 3 1
      libobs/util/sse-intrin.h

+ 3 - 1
libobs/util/sse-intrin.h

@@ -17,7 +17,9 @@
 
 #pragma once
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) && \
+	!(defined(_M_ARM64) || defined(_M_ARM64EC))
+
 #include <emmintrin.h>
 #else
 #define SIMDE_ENABLE_NATIVE_ALIASES