Skip to content

Commit 5f50f4a

Browse files
stinosdpgeorge
authored andcommitted
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.
1 parent 49934fc commit 5f50f4a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ports/unix/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "py/mphal.h"
4848
#include "py/mpthread.h"
4949
#include "extmod/misc.h"
50+
#include "extmod/moduplatform.h"
5051
#include "extmod/vfs.h"
5152
#include "extmod/vfs_posix.h"
5253
#include "genhdr/mpversion.h"
@@ -178,7 +179,8 @@ STATIC char *strjoin(const char *s1, int sep_char, const char *s2) {
178179

179180
STATIC int do_repl(void) {
180181
mp_hal_stdout_tx_str("MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; "
181-
MICROPY_PY_SYS_PLATFORM " version\nUse Ctrl-D to exit, Ctrl-E for paste mode\n");
182+
MICROPY_PY_SYS_PLATFORM " [" MICROPY_PLATFORM_COMPILER "] version\n"
183+
"Use Ctrl-D to exit, Ctrl-E for paste mode\n");
182184

183185
#if MICROPY_USE_READLINE == 1
184186

0 commit comments

Comments
 (0)