Skip to content

Commit

Permalink
clang arm64
Browse files Browse the repository at this point in the history
Co-authored-by: Naveen M K <[email protected]>
  • Loading branch information
2 people authored and lazka committed Jul 19, 2023
1 parent eca928e commit 50c4354
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Python/getcompiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Note the __clang__ conditional has to come before the __GNUC__ one because
// clang pretends to be GCC.
#if defined(__clang__)
#if defined(__clang__) && !defined(_WIN32)
#define COMPILER "[Clang " __clang_version__ "]"
#elif defined(__GNUC__)
/* To not break compatibility with things that determine
Expand All @@ -18,14 +18,23 @@
#define COMP_SEP " "
#if defined(__x86_64__)
#define ARCH_SUFFIX " 64 bit (AMD64)"
#elif defined(__aarch64__)
#define ARCH_SUFFIX " 64 bit (ARM64)"
#else
#define ARCH_SUFFIX " 32 bit"
#endif
#else
#define COMP_SEP "\n"
#define ARCH_SUFFIX ""
#endif
#if defined(__clang__)
#define str(x) #x
#define xstr(x) str(x)
#define COMPILER COMP_SEP "[GCC Clang " xstr(__clang_major__) "." \
xstr(__clang_minor__) "." xstr(__clang_patchlevel__) ARCH_SUFFIX "]"
#else
#define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]"
#endif
// Generic fallbacks.
#elif defined(__cplusplus)
#define COMPILER "[C++]"
Expand Down

0 comments on commit 50c4354

Please sign in to comment.