]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41100: Stripping '-arch arm64' didn't work after all (GH-23280)
authorRonald Oussoren <ronaldoussoren@mac.com>
Sun, 22 Nov 2020 02:17:18 +0000 (03:17 +0100)
committerGitHub <noreply@github.com>
Sun, 22 Nov 2020 02:17:18 +0000 (21:17 -0500)
Lib/_osx_support.py

index 8a696ee9895e9b58f75ceea7f66dcf43992dcfdc..0cbfeed0c4ecfdd435bc39ed450fabda48339657 100644 (file)
@@ -128,7 +128,7 @@ def _get_system_version_tuple():
                 _SYSTEM_VERSION_TUPLE = ()
 
     return _SYSTEM_VERSION_TUPLE
-   
+
 
 def _remove_original_values(_config_vars):
     """Remove original unmodified values for testing"""
@@ -357,7 +357,7 @@ def compiler_fixup(compiler_so, cc_args):
 
     elif not _supports_arm64_builds():
         # Look for "-arch arm64" and drop that
-        for idx in range(len(compiler_so)):
+        for idx in reversed(range(len(compiler_so))):
             if compiler_so[idx] == '-arch' and compiler_so[idx+1] == "arm64":
                 del compiler_so[idx:idx+2]