summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2022-02-18 19:38:55 +0100
committerDamien George <damien@micropython.org>2022-02-22 00:59:31 +1100
commit5f50f4a130e60c4bc5f4fbf58ac849dcaf764e72 (patch)
treebfc043441a9495d655120c9a96318f68744faf20
parent49934fcf8b0b2bd906a96e1ff57b724d8dd6d93e (diff)
unix: Show compiler info in REPL banner.
The unix port's main.c gets used by unix and windows ports, and with a variety of compilers, so it's convenient to see which version is actually being used immediately when starting micropython. This is similar to what CPython does.
-rw-r--r--ports/unix/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ports/unix/main.c b/ports/unix/main.c
index b2790791a..2769f3319 100644
--- a/ports/unix/main.c
+++ b/ports/unix/main.c
@@ -47,6 +47,7 @@
#include "py/mphal.h"
#include "py/mpthread.h"
#include "extmod/misc.h"
+#include "extmod/moduplatform.h"
#include "extmod/vfs.h"
#include "extmod/vfs_posix.h"
#include "genhdr/mpversion.h"
@@ -178,7 +179,8 @@ STATIC char *strjoin(const char *s1, int sep_char, const char *s2) {
STATIC int do_repl(void) {
mp_hal_stdout_tx_str("MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; "
- MICROPY_PY_SYS_PLATFORM " version\nUse Ctrl-D to exit, Ctrl-E for paste mode\n");
+ MICROPY_PY_SYS_PLATFORM " [" MICROPY_PLATFORM_COMPILER "] version\n"
+ "Use Ctrl-D to exit, Ctrl-E for paste mode\n");
#if MICROPY_USE_READLINE == 1