[NFCI][bolt][test] Enable AT&T syntax generally (#172355)

Having it in the X86 subdirectory only affects tests in that directory.
That's however not sufficient as for example runtime/X86/pie-exceptions-split.test is affected but
isn't located in the X86 directory.
This essentially fixes the fix for the original commit by guarding it properly for when the X86
target has been built and the flag is recognized.

Fixes: 6c48fbc1dcfbd44a47f126f21e575340b67aac06
This commit is contained in:
Raul Tambre 2026-01-23 10:46:31 +02:00 committed by GitHub
parent 84b2f120f3
commit 2d62af808b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
if not "X86" in config.root.targets:
config.unsupported = True
flags = "--target=x86_64-unknown-linux-gnu -nostdlib -mllvm -x86-asm-syntax=att"
flags = "--target=x86_64-unknown-linux-gnu -nostdlib"
config.substitutions.insert(0, ("%cflags", f"%cflags {flags}"))
config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}"))

View File

@ -7,5 +7,10 @@ if not "linux" in host_triple:
common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie"
flags = f"--target={host_triple} -fPIE {common_linker_flags}"
# Our files use x86 AT&T assembly throughout.
# Enable it explicitly so any local Clang preference for Intel syntax gets overriden.
if "x86-registered-target" in config.available_features:
flags += " -mllvm -x86-asm-syntax=att"
config.substitutions.insert(0, ("%cflags", f"%cflags {flags}"))
config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}"))