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.
This commit is contained in:
stijn 2022-02-18 19:38:55 +01:00 committed by Damien George
parent 49934fcf8b
commit 5f50f4a130

View File

@ -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