mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 13:10:21 +01:00
py/mkrules.mk: Automatically configure frozen options when manifest set.
Following how mkrules.cmake works. This makes it easy for a port to enable frozen code, by defining FROZEN_MANIFEST in its Makefile. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -183,6 +183,11 @@ ifeq ($(MPY_LIB_DIR),$(MPY_LIB_SUBMODULE_DIR))
|
||||
GIT_SUBMODULES += lib/micropython-lib
|
||||
endif
|
||||
|
||||
# Set compile options needed to enable frozen code.
|
||||
CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
|
||||
CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
|
||||
CFLAGS += -DMICROPY_MODULE_FROZEN_STR
|
||||
|
||||
# to build frozen_content.c from a manifest
|
||||
$(BUILD)/frozen_content.c: FORCE $(BUILD)/genhdr/qstrdefs.generated.h $(BUILD)/genhdr/root_pointers.h | $(MICROPY_MPYCROSS_DEPENDENCY)
|
||||
$(Q)test -e "$(MPY_LIB_DIR)/README.md" || (echo -e $(HELP_MPY_LIB_SUBMODULE); false)
|
||||
|
||||
Reference in New Issue
Block a user