]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-124820: Move `-mno-outline-atomics` flag to aarch64 Linux JIT builds only (#124821)
authorSavannah Ostrowski <savannahostrowski@gmail.com>
Wed, 2 Oct 2024 09:40:59 +0000 (02:40 -0700)
committerGitHub <noreply@github.com>
Wed, 2 Oct 2024 09:40:59 +0000 (11:40 +0200)
Tools/jit/_targets.py

index 6c7b48f1f37865ed486b99a02640df7e3fd978c9..b6c0e79e72fb3e982af435659d40d2902aaf7a9d 100644 (file)
@@ -139,9 +139,6 @@ class _Target(typing.Generic[_S, _R]):
             "-fno-plt",
             # Don't call stack-smashing canaries that we can't find or patch:
             "-fno-stack-protector",
-            # On aarch64 Linux, intrinsics were being emitted and this flag
-            # was required to disable them.
-            "-mno-outline-atomics",
             "-std=c11",
             *self.args,
         ]
@@ -527,7 +524,12 @@ def get_target(host: str) -> _COFF | _ELF | _MachO:
         args = ["-fms-runtime-lib=dll"]
         target = _COFF(host, alignment=8, args=args)
     elif re.fullmatch(r"aarch64-.*-linux-gnu", host):
-        args = ["-fpic"]
+        args = [
+            "-fpic",
+            # On aarch64 Linux, intrinsics were being emitted and this flag
+            # was required to disable them.
+            "-mno-outline-atomics",
+        ]
         target = _ELF(host, alignment=8, args=args)
     elif re.fullmatch(r"i686-pc-windows-msvc", host):
         args = ["-DPy_NO_ENABLE_SHARED"]