use max-inline-insns-auto=110 only on SAMD21

This commit is contained in:
Dan Halbert 2023-03-28 16:28:31 -04:00
parent 11082435f1
commit b2535496b0

View File

@ -104,20 +104,17 @@ else
CFLAGS += -DNDEBUG CFLAGS += -DNDEBUG
# Do a default shrink for small builds, including all SAMD21 builds. # Do a default shrink for small builds, including all SAMD21 builds.
ifeq ($(CIRCUITPY_FULL_BUILD),0)
SHRINK_BUILD = 1
else
ifeq ($(CHIP_FAMILY), samd21)
SHRINK_BUILD = 1
endif
endif
# -finline-limit can shrink the image size. # -finline-limit can shrink the image size.
# -finline-limit=80 or so is similar to not having it on. # -finline-limit=80 or so is similar to not having it on.
# There is no simple default value, though. # There is no simple default value, though.
ifeq ($(SHRINK_BUILD), 1) ifeq ($(CIRCUITPY_FULL_BUILD),0)
CFLAGS += -finline-limit=45
else
ifeq ($(CHIP_FAMILY), samd21)
# max-inline-insns-auto increases the size of SAMD51 builds.
CFLAGS += -finline-limit=45 --param max-inline-insns-auto=110 CFLAGS += -finline-limit=45 --param max-inline-insns-auto=110
endif endif
endif
# We used to do this but it seems to not reduce space any more, at least in gcc 11. # We used to do this but it seems to not reduce space any more, at least in gcc 11.
# Leave it here, commented out, just for reference. # Leave it here, commented out, just for reference.