mirror of
https://github.com/google/cpu_features.git
synced 2025-07-01 21:31:15 +02:00
Add support for Apple M1 AArch64 SoCs (#204)
* Add support for Apple M1 AArch64 SoCs Completely based on #150. Thanks to @sbehnke! + Refactoring to accomodate the new source tree + Adding more feature flags * revert minimum version to 3.0 * Update introspection table * Simplify logic for Apple HAVE_SYSCTLBYNAME --------- Co-authored-by: Guillaume Chatelet <gchatelet@google.com>
This commit is contained in:
@ -74,8 +74,15 @@ if(PROCESSOR_IS_AARCH64)
|
||||
add_executable(cpuinfo_aarch64_test
|
||||
cpuinfo_aarch64_test.cc
|
||||
../src/impl_aarch64_linux_or_android.c
|
||||
../src/impl_aarch64_windows.c)
|
||||
target_compile_definitions(cpuinfo_aarch64_test PUBLIC CPU_FEATURES_MOCK_CPUID_AARCH64)
|
||||
../src/impl_aarch64_windows.c
|
||||
../src/impl_aarch64_macos_or_iphone.c
|
||||
)
|
||||
if(APPLE)
|
||||
target_compile_definitions(cpuinfo_aarch64_test PUBLIC CPU_FEATURES_MOCK_SYSCTL_AARCH64)
|
||||
target_compile_definitions(cpuinfo_aarch64_test PRIVATE HAVE_SYSCTLBYNAME)
|
||||
else()
|
||||
target_compile_definitions(cpuinfo_aarch64_test PUBLIC CPU_FEATURES_MOCK_CPUID_AARCH64)
|
||||
endif()
|
||||
target_link_libraries(cpuinfo_aarch64_test all_libraries)
|
||||
add_test(NAME cpuinfo_aarch64_test COMMAND cpuinfo_aarch64_test)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user