py: Don't include mp_optimise_value or opt_level() if compiler disabled.

Without the compiler enabled the mp_optimise_value is unused, and the
micropython.opt_level() function is not useful, so exclude these from the
build to save RAM and code size.
This commit is contained in:
Damien George
2018-04-04 14:24:03 +10:00
parent 323b5f7270
commit 3f420c0c27
3 changed files with 8 additions and 0 deletions

View File

@@ -199,7 +199,9 @@ typedef struct _mp_state_vm_t {
mp_thread_mutex_t qstr_mutex;
#endif
#if MICROPY_ENABLE_COMPILER
mp_uint_t mp_optimise_value;
#endif
// size of the emergency exception buf, if it's dynamically allocated
#if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0