Skip to content

Commit 914648c

Browse files
committed
py/py.mk: Force nlr files to be compiled with -Os.
1 parent f0dddb6 commit 914648c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

py/py.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ $(HEADER_BUILD)/qstrdefs.generated.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_C
282282
$(Q)cat $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_COLLECTED) | $(SED) 's/^Q(.*)/"&"/' | $(CPP) $(CFLAGS) - | $(SED) 's/^"\(Q(.*)\)"/\1/' > $(HEADER_BUILD)/qstrdefs.preprocessed.h
283283
$(Q)$(PYTHON) $(PY_SRC)/makeqstrdata.py $(HEADER_BUILD)/qstrdefs.preprocessed.h > $@
284284

285+
# Force nlr code to always be compiled with space-saving optimisation so
286+
# that the function preludes are of a minimal and predictable form.
287+
$(PY_BUILD)/nlr%.o: CFLAGS += -Os
288+
285289
# emitters
286290

287291
$(PY_BUILD)/emitnx64.o: CFLAGS += -DN_X64

0 commit comments

Comments
 (0)