From 1fb98f5ebd006f92e4061265dbdf7ce92a6990e5 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Wed, 17 May 2023 15:47:36 -0700 Subject: [PATCH] Don't double build ARM64 arch on M1 Macs PiperOrigin-RevId: 532934646 --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 892c6dca7..b61e5c296 100644 --- a/setup.py +++ b/setup.py @@ -357,7 +357,10 @@ class BuildExtension(build_ext.build_ext): for ext in self.extensions: target_name = self.get_ext_fullpath(ext.name) # Build x86 - self._build_binary(ext) + self._build_binary( + ext, + ['--cpu=darwin', '--ios_multi_cpus=i386,x86_64,armv7,arm64'], + ) x86_name = self.get_ext_fullpath(ext.name) # Build Arm64 ext.name = ext.name + '.arm64'