diff options
author | Paul m. p. P <pmpp.pub@gmail.com> | 2019-07-08 09:45:02 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-07-09 13:17:15 +1000 |
commit | a1c870e9f4562e1c1fd056653ff49efdda8bd840 (patch) | |
tree | 0dc30daeeec29fe2edb851deeb878f7d80493df6 | |
parent | 42d30c5bafc4d1d94787257eedf5c845423658f1 (diff) |
javascript: Enable support for frozen bytecode via FROZEN_MPY_DIR.
-rw-r--r-- | ports/javascript/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/javascript/Makefile b/ports/javascript/Makefile index 7309dfa48..384253e54 100644 --- a/ports/javascript/Makefile +++ b/ports/javascript/Makefile @@ -25,6 +25,13 @@ LDFLAGS = -m32 -Wl,-Map=$@.map,--cref -Wl,--gc-sections CFLAGS += -O0 -DNDEBUG CFLAGS += -fdata-sections -ffunction-sections +ifneq ($(FROZEN_MPY_DIR),) +# To use frozen bytecode, put your .py files in a subdirectory (eg frozen/) and +# then invoke make with FROZEN_MPY_DIR=frozen (be sure to build from scratch). +CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool +CFLAGS += -DMICROPY_MODULE_FROZEN_MPY +endif + SRC_LIB = $(addprefix lib/,\ utils/interrupt_char.c \ utils/stdout_helpers.c \ |