1
0
mirror of https://github.com/google/cpu_features.git synced 2025-09-16 08:55:25 +02:00

Merge pull request #403 from google/fix_apple_detection

Fix broken `CPU_FEATURES_OS_MACOS` and `CPU_FEATURES_OS_IPHONE` detection
This commit is contained in:
Guillaume Chatelet
2025-08-27 11:29:24 +02:00
committed by GitHub

View File

@@ -115,10 +115,10 @@
#if (defined(__apple__) || defined(__APPLE__) || defined(__MACH__)) #if (defined(__apple__) || defined(__APPLE__) || defined(__MACH__))
// From https://stackoverflow.com/a/49560690 // From https://stackoverflow.com/a/49560690
#include "TargetConditionals.h" #include "TargetConditionals.h"
#if defined(TARGET_OS_OSX) #if TARGET_OS_OSX
#define CPU_FEATURES_OS_MACOS #define CPU_FEATURES_OS_MACOS
#endif #endif
#if defined(TARGET_OS_IPHONE) #if TARGET_OS_IPHONE
// This is set for any non-Mac Apple products (IOS, TV, WATCH) // This is set for any non-Mac Apple products (IOS, TV, WATCH)
#define CPU_FEATURES_OS_IPHONE #define CPU_FEATURES_OS_IPHONE
#endif #endif