mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
cpuid: exclude AVX512 flag when target not enabled
If we have a fat runtime build without AVX512 enabled, we should not pick up the AVX512 flag from cpuid.
This commit is contained in:
parent
d317d75615
commit
345897f096
@ -21,6 +21,9 @@
|
||||
/* Define if building "fat" runtime. */
|
||||
#cmakedefine FAT_RUNTIME
|
||||
|
||||
/* Define if building AVX-512 in the fat runtime. */
|
||||
#cmakedefine BUILD_AVX512
|
||||
|
||||
/* Define to 1 if `backtrace' works. */
|
||||
#cmakedefine HAVE_BACKTRACE
|
||||
|
||||
|
@ -192,7 +192,8 @@ u64a cpuid_flags(void) {
|
||||
cap &= ~HS_CPU_FEATURES_AVX2;
|
||||
#endif
|
||||
|
||||
#if !defined(FAT_RUNTIME) && !defined(HAVE_AVX512)
|
||||
#if (!defined(FAT_RUNTIME) && !defined(HAVE_AVX512)) || \
|
||||
(defined(FAT_RUNTIME) && !defined(BUILD_AVX512))
|
||||
cap &= ~HS_CPU_FEATURES_AVX512;
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user