Skip to content

Commit

Permalink
unix: Show compiler info in REPL banner.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stinos authored and dpgeorge committed Feb 21, 2022
1 parent 49934fc commit 5f50f4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ports/unix/main.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5f50f4a

Please sign in to comment.