Skip to content

Commit 4570984

Browse files
committed
builtins: honour _M_ARM64 as __aarch64__
When clang is used as `clang-cl`, we use MSVC style macros. The spelling of `__aarch64__` is converted to `_M_ARM64`. Account for this alternative spelling in the conditional check. While in the area, add a tertiary spelling of `__arm64__` to ensure that we catch more of the variants.
1 parent 0cfa5ab commit 4570984

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/builtins/cpu_model/aarch64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "aarch64.h"
1616

17-
#if !defined(__aarch64__)
17+
#if !defined(__aarch64__) && !defined(__arm64__) && !defined(_M_ARM64)
1818
#error This file is intended only for aarch64-based targets
1919
#endif
2020

0 commit comments

Comments
 (0)