diff options
author | Minmin Gong <gongminmin@msn.com> | 2019-01-21 20:49:40 (GMT) |
---|---|---|
committer | Antoine Pitrou <pitrou@free.fr> | 2019-01-21 20:49:40 (GMT) |
commit | 7a2368063f25746d4008a74aca0dc0b82f86ff7b (patch) | |
tree | a605504586d392744052d1b61307344b0c2ee291 /Include/internal | |
parent | 2433a2ab705e93f9a44f01c260d351b205a73e9d (diff) | |
download | cpython-7a2368063f25746d4008a74aca0dc0b82f86ff7b.zip cpython-7a2368063f25746d4008a74aca0dc0b82f86ff7b.tar.gz cpython-7a2368063f25746d4008a74aca0dc0b82f86ff7b.tar.bz2 |
bpo-35758: Fix building on ARM + MSVC (gh-11531)
* Disable x87 control word for non-x86 targets
On msvc, x87 control word is only available on x86 target. Need to disable it for other targets to prevent compiling problems.
* Include immintrin.h on x86 and x64 only
Immintrin.h is only available on x86 and x64. Need to disable it for other targets to prevent compiling problems.
Diffstat (limited to 'Include/internal')
-rw-r--r-- | Include/internal/pycore_atomic.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/internal/pycore_atomic.h b/Include/internal/pycore_atomic.h index f430a5c..5669f71 100644 --- a/Include/internal/pycore_atomic.h +++ b/Include/internal/pycore_atomic.h @@ -19,7 +19,9 @@ extern "C" { #if defined(_MSC_VER) #include <intrin.h> -#include <immintrin.h> +#if defined(_M_IX86) || defined(_M_X64) +# include <immintrin.h> +#endif #endif /* This is modeled after the atomics interface from C1x, according to |