Shrink the smallest builds with compile options

This commit is contained in:
Dan Halbert 2021-03-04 23:07:06 -05:00
parent c68073e12b
commit c97721455a

View File

@ -150,7 +150,13 @@ else
CFLAGS += -flto -flto-partition=none
ifeq ($(CIRCUITPY_FULL_BUILD),0)
CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20
# Increasing max-inline-insns-auto from 20 to 1000 gains about 300 bytes on a small build.
CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=1000
# These optimizations are normally -O3 only. They improve the way register
# allocation is done, but, to quote the gcc doc, 'can, however, make debugging impossible,
# since variables will no longer stay in a “home register”.'
# On a small build they can gain about 200 bytes.
CFLAGS += -fweb -frename-registers
endif
ifdef CFLAGS_BOARD