Skip to content

Commit 6737333

Browse files
GH-124820: Move -mno-outline-atomics flag to aarch64 Linux JIT builds only (#124821)
1 parent 9b31a2d commit 6737333

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tools/jit/_targets.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ async def _compile(
139139
"-fno-plt",
140140
# Don't call stack-smashing canaries that we can't find or patch:
141141
"-fno-stack-protector",
142-
# On aarch64 Linux, intrinsics were being emitted and this flag
143-
# was required to disable them.
144-
"-mno-outline-atomics",
145142
"-std=c11",
146143
*self.args,
147144
]
@@ -527,7 +524,12 @@ def get_target(host: str) -> _COFF | _ELF | _MachO:
527524
args = ["-fms-runtime-lib=dll"]
528525
target = _COFF(host, alignment=8, args=args)
529526
elif re.fullmatch(r"aarch64-.*-linux-gnu", host):
530-
args = ["-fpic"]
527+
args = [
528+
"-fpic",
529+
# On aarch64 Linux, intrinsics were being emitted and this flag
530+
# was required to disable them.
531+
"-mno-outline-atomics",
532+
]
531533
target = _ELF(host, alignment=8, args=args)
532534
elif re.fullmatch(r"i686-pc-windows-msvc", host):
533535
args = ["-DPy_NO_ENABLE_SHARED"]

0 commit comments

Comments
 (0)