Skip to content

Commit

Permalink
check_cpufeatures - fix MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
K0lb3 committed Sep 18, 2024
1 parent 25ea09f commit 1c3bddb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def build_extensions(self):
"-arm" in self.plat_name or "-aarch64" in self.plat_name
):
# no need to check for SIMD on ARM
ext.sources.append("src/check_cpufeatures.cpp")
ext.extra_compile_args.append("-DCHECK_CPU_FEATURES")

if compiler_type == "msvc":
add_msvc_flags(ext, self.plat_name, enable_simd)
else:
Expand All @@ -80,7 +82,6 @@ def create_etcpak_extension(enable_simd: bool):
f"etcpak.{module_name}",
[
"src/pylink.cpp",
"src/check_cpufeatures.cpp",
"src/dummy.cpp",
*[f"src/etcpak/{src}" for src in ETCPAK_SOURCES],
],
Expand Down
1 change: 1 addition & 0 deletions src/check_cpufeatures.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// copied from: https://github.com/robbmcleod/cpufeature/blob/master/cpufeature/cpu_x86.c
#include <stdint.h>
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86)
#if _WIN32
#include "cpu_x86_windows.c"
Expand Down

0 comments on commit 1c3bddb

Please sign in to comment.