diff options
author | Damien George <damien.p.george@gmail.com> | 2019-05-29 21:17:29 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-05-29 21:17:29 +1000 |
commit | a4f1d82757b8e95c21a095c99b7c3f04ded88104 (patch) | |
tree | 6c3f0112c2785e531b8cec986a6740665e1aa300 /py/nativeglue.c | |
parent | bff4e130099e2ec17478bb00f7eaa5d85fb763dc (diff) | |
download | micropython-a4f1d82757b8e95c21a095c99b7c3f04ded88104.tar.gz micropython-a4f1d82757b8e95c21a095c99b7c3f04ded88104.zip |
py/nativeglue: Remove dependency on mp_fun_table in dyn-compiler mode.
mpy-cross uses MICROPY_DYNAMIC_COMPILER and MICROPY_EMIT_NATIVE but does
not actually need to execute native functions, and does not need
mp_fun_table. This commit makes it so mp_fun_table and all its entries are
not built when MICROPY_DYNAMIC_COMPILER is enabled, significantly reducing
the size of the mpy-cross executable and allowing it to be built on more
machines/OS's.
Diffstat (limited to 'py/nativeglue.c')
-rw-r--r-- | py/nativeglue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/nativeglue.c b/py/nativeglue.c index 8f38ecd16e..11d7a283a2 100644 --- a/py/nativeglue.c +++ b/py/nativeglue.c @@ -95,7 +95,7 @@ mp_obj_t mp_native_to_obj(mp_uint_t val, mp_uint_t type) { #endif -#if MICROPY_EMIT_NATIVE +#if MICROPY_EMIT_NATIVE && !MICROPY_DYNAMIC_COMPILER STATIC mp_obj_dict_t *mp_native_swap_globals(mp_obj_dict_t *new_globals) { if (new_globals == NULL) { |