From 219d8fb7eb20456ec5ae01b9ceb1884ddea2f0e1 Mon Sep 17 00:00:00 2001 From: Max Belanger Date: Fri, 26 Jul 2024 12:24:01 -0400 Subject: [PATCH] make `setup.py` capable of detecting cross-compiling on windows when targeting arm64 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 48648595..12de93d9 100644 --- a/setup.py +++ b/setup.py @@ -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: