Skip to content

Commit

Permalink
make setup.py capable of detecting cross-compiling on windows when …
Browse files Browse the repository at this point in the history
…targeting arm64
  • Loading branch information
maxbelanger committed Jul 26, 2024
1 parent fb6e5dc commit 219d8fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def use_homebrew_for_libffi():
os.environ.get('PKG_CONFIG_PATH', '') + ':' + pkgconfig)

if sys.platform == "win32" and uses_msvc():
if platform.machine() == "ARM64":
if platform.machine() == "ARM64" or os.getenv("VSCMD_ARG_TGT_ARCH") == "arm64":
include_dirs.append(os.path.join("src/c/libffi_arm64/include"))
library_dirs.append(os.path.join("src/c/libffi_arm64"))
else:
Expand Down

0 comments on commit 219d8fb

Please sign in to comment.