Skip to content

Commit b253549

Browse files
committed
use max-inline-insns-auto=110 only on SAMD21
1 parent 1108243 commit b253549

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

ports/atmel-samd/Makefile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,18 @@ else
104104
CFLAGS += -DNDEBUG
105105

106106
# Do a default shrink for small builds, including all SAMD21 builds.
107+
# -finline-limit can shrink the image size.
108+
# -finline-limit=80 or so is similar to not having it on.
109+
# There is no simple default value, though.
107110
ifeq ($(CIRCUITPY_FULL_BUILD),0)
108-
SHRINK_BUILD = 1
111+
CFLAGS += -finline-limit=45
109112
else
110113
ifeq ($(CHIP_FAMILY), samd21)
111-
SHRINK_BUILD = 1
114+
# max-inline-insns-auto increases the size of SAMD51 builds.
115+
CFLAGS += -finline-limit=45 --param max-inline-insns-auto=110
112116
endif
113117
endif
114118

115-
# -finline-limit can shrink the image size.
116-
# -finline-limit=80 or so is similar to not having it on.
117-
# There is no simple default value, though.
118-
ifeq ($(SHRINK_BUILD), 1)
119-
CFLAGS += -finline-limit=45 --param max-inline-insns-auto=110
120-
endif
121-
122119
# We used to do this but it seems to not reduce space any more, at least in gcc 11.
123120
# Leave it here, commented out, just for reference.
124121
# --param inline-unit-growth=15

0 commit comments

Comments
 (0)