[compiler-rt] [libunwind] [openmp] [NFCI][asm][i386/x86-64] Enable AT&T syntax explicitly (PR #164453)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 15:51:54 PDT 2025


PiJoules wrote:

I believe this patch is leading to this build error on our builders (https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8700376349587788321/overview):

```
FAILED: CMakeFiles/clang_rt.atomic-dynamic-i386.dir/atomic.c.o 
/b/s/w/ir/x/w/llvm_build/./bin/clang --target=i386-unknown-linux-gnu --sysroot=/b/s/w/ir/x/w/cipd/linux -DCOMPILER_RT_SHARED_LIB -D_LIBATOMIC_USE_PTHREAD -Dclang_rt_atomic_dynamic_i386_EXPORTS -I/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/../../../third-party/siphash/include --target=i386-unknown-linux-gnu -O2 -g -DNDEBUG -fPIC -fno-lto -MD -MT CMakeFiles/clang_rt.atomic-dynamic-i386.dir/atomic.c.o -MF CMakeFiles/clang_rt.atomic-dynamic-i386.dir/atomic.c.o.d -o CMakeFiles/clang_rt.atomic-dynamic-i386.dir/atomic.c.o -c /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/atomic.c
In file included from /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/atomic.c:30:
/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/assembly.h:341:1: error: expected identifier or '('
  341 | .att_syntax
      | ^
/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/atomic.c:132:25: error: use of undeclared identifier 'SPINLOCK_MASK'
  132 |   intptr_t low = hash & SPINLOCK_MASK;
      |                         ^~~~~~~~~~~~~
/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/atomic.c:138:26: error: use of undeclared identifier 'SPINLOCK_MASK'
  138 |   return locks + (hash & SPINLOCK_MASK);
      |                          ^~~~~~~~~~~~~
3 errors generated.
```

Not sure where the `SPINLOCK_MASK` error comes from, but I think since `assembly.h` is included in this C file the `.att_syntax` needs a `#ifdef __ASSEMBLER__` wrapper.

https://github.com/llvm/llvm-project/pull/164453


More information about the llvm-commits mailing list