py/modmicropython: Make module optional.

This module is useful, but it is not always needed. Disabling it saves
several kilobytes of build size, depending on other config options.

Signed-off-by: Laurens Valk <laurens@pybricks.com>
This commit is contained in:
Laurens Valk
2022-11-29 10:38:57 +01:00
committed by Damien George
parent fb7d211530
commit f724d90e6c
2 changed files with 9 additions and 0 deletions

View File

@@ -32,6 +32,8 @@
#include "py/gc.h"
#include "py/mphal.h"
#if MICROPY_PY_MICROPYTHON
// Various builtins specific to MicroPython runtime,
// living in micropython module
@@ -211,3 +213,5 @@ const mp_obj_module_t mp_module_micropython = {
};
MP_REGISTER_MODULE(MP_QSTR_micropython, mp_module_micropython);
#endif // MICROPY_PY_MICROPYTHON