summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-03-02 21:56:10 +1100
committerDamien George <damien.p.george@gmail.com>2017-03-06 17:13:43 +1100
commit914648ce0e353b5af59dbd3412bb4aa438864010 (patch)
tree80b0b927a18c3e88783a18d937927b40f2f566d0 /py
parentf0dddb688d67995bbd737164dd4b9548698cf09f (diff)
downloadmicropython-914648ce0e353b5af59dbd3412bb4aa438864010.tar.gz
micropython-914648ce0e353b5af59dbd3412bb4aa438864010.zip
py/py.mk: Force nlr files to be compiled with -Os.
Diffstat (limited to 'py')
-rw-r--r--py/py.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/py.mk b/py/py.mk
index 01a8026744..c4e2a79e66 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -282,6 +282,10 @@ $(HEADER_BUILD)/qstrdefs.generated.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_C
$(Q)cat $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_COLLECTED) | $(SED) 's/^Q(.*)/"&"/' | $(CPP) $(CFLAGS) - | $(SED) 's/^"\(Q(.*)\)"/\1/' > $(HEADER_BUILD)/qstrdefs.preprocessed.h
$(Q)$(PYTHON) $(PY_SRC)/makeqstrdata.py $(HEADER_BUILD)/qstrdefs.preprocessed.h > $@
+# Force nlr code to always be compiled with space-saving optimisation so
+# that the function preludes are of a minimal and predictable form.
+$(PY_BUILD)/nlr%.o: CFLAGS += -Os
+
# emitters
$(PY_BUILD)/emitnx64.o: CFLAGS += -DN_X64