extmod/modplatform: Add Clang to the known compilers list.
This commit adds support to distinguish between GCC and Clang to report the appropriate compiler version. Usually Clang also disguises itself as GCC for compatibility reasons, but these changes look for Clang-specific definitions first to avoid that problem. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
parent
579e840de6
commit
09cf01d7c1
1 changed files with 7 additions and 1 deletions
|
|
@ -53,7 +53,13 @@
|
|||
#define MICROPY_PLATFORM_ARCH ""
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__clang__)
|
||||
#define MICROPY_PLATFORM_COMPILER \
|
||||
"Clang " \
|
||||
MP_STRINGIFY(__clang_major__) "." \
|
||||
MP_STRINGIFY(__clang_minor__) "." \
|
||||
MP_STRINGIFY(__clang_patchlevel__)
|
||||
#elif defined(__GNUC__)
|
||||
#define MICROPY_PLATFORM_COMPILER \
|
||||
"GCC " \
|
||||
MP_STRINGIFY(__GNUC__) "." \
|
||||
|
|
|
|||
Loading…
Reference in a new issue