mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
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:
committed by
Damien George
parent
579e840de6
commit
09cf01d7c1
@@ -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__) "." \
|
||||
|
||||
Reference in New Issue
Block a user