Skip to content

Commit

Permalink
Forward fix cpu_features_macros.h
Browse files Browse the repository at this point in the history
This is a fix for #363 . The preprocessor check must be done in two steps.
  • Loading branch information
gchatelet authored Sep 10, 2024
1 parent 6aecde5 commit ae176ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/cpu_features_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,15 @@

#endif // defined(CPU_FEATURES_ARCH_X86)

#if defined(CPU_FEATURES_ARCH_ANY_ARM)
// Note: MSVC targeting ARM does not define `__ARM_NEON` but Windows on ARM
// requires it. In that case we force NEON detection.
#if defined(__ARM_NEON) || \
(defined(CPU_FEATURES_COMPILER_MSC) && defined(CPU_FEATURES_ARCH_ANY_ARM))
#if defined(__ARM_NEON) || defined(CPU_FEATURES_COMPILER_MSC)
#define CPU_FEATURES_COMPILED_ANY_ARM_NEON 1
#else
#define CPU_FEATURES_COMPILED_ANY_ARM_NEON 0
#endif
#endif // defined(__ARM_NEON) || defined(CPU_FEATURES_COMPILER_MSC)
#endif // defined(CPU_FEATURES_ARCH_ANY_ARM)

#if defined(CPU_FEATURES_ARCH_MIPS)
#if defined(__mips_msa)
Expand Down

0 comments on commit ae176ff

Please sign in to comment.