Skip to content

Commit f7bbcde

Browse files
authored
[compiler-rt] Fix building for arm64ec (#164590)
c208a23 added the directive `.att_syntax` when building for x86 architectures. However, when building for arm64ec (a Windows target, for an ABI compatible with x86_64), the defines for `__x86_64__` (and similar ones like `__amd64__`) are still defined, so we need to check for `__arm64ec__` here as well to skip it for such targets. This matches similar existing ifdefs for x86_64/aarch64 in compiler-rt builtins.
1 parent ea45fec commit f7bbcde

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler-rt/lib/builtins/assembly.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@
337337
#endif
338338
#endif
339339

340-
#if defined(__ASSEMBLER__) && (defined(__i386__) || defined(__amd64__))
340+
#if defined(__ASSEMBLER__) && (defined(__i386__) || defined(__amd64__)) && \
341+
!defined(__arm64ec__)
341342
.att_syntax
342343
#endif
343344

0 commit comments

Comments
 (0)