File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ CIRCUITPY_PS2IO ?= 1
106
106
CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FRAMEBUFFERIO )
107
107
CIRCUITPY_SAMD ?= 1
108
108
CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12
109
+ CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 1
109
110
CIRCUITPY_WATCHDOG ?= 1
110
111
111
112
endif # samd51
@@ -131,6 +132,7 @@ CIRCUITPY_SAMD ?= 1
131
132
CIRCUITPY_FLOPPYIO ?= $(CIRCUITPY_FULL_BUILD )
132
133
CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD )
133
134
CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FRAMEBUFFERIO )
135
+ CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 1
134
136
135
137
endif # same51
136
138
# #####################################################################
Original file line number Diff line number Diff line change @@ -559,6 +559,9 @@ CFLAGS += -DCIRCUITPY_ZLIB=$(CIRCUITPY_ZLIB)
559
559
CIRCUITPY_ULAB ?= $(CIRCUITPY_FULL_BUILD )
560
560
CFLAGS += -DCIRCUITPY_ULAB=$(CIRCUITPY_ULAB )
561
561
562
+ # whether to use -Os optimization on files in ulab
563
+ CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 0
564
+
562
565
# CIRCUITPY_VIDEOCORE is handled in the broadcom tree.
563
566
# Only for Broadcom chips.
564
567
# Assume not a Broadcom build.
Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ ULAB_SRCS := $(shell find $(TOP)/extmod/ulab/code -type f -name "*.c")
57
57
SRC_MOD += $(patsubst $(TOP ) /% ,% ,$(ULAB_SRCS ) )
58
58
CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -DULAB_HAS_USER_MODULE=0 -iquote $(TOP ) /extmod/ulab/code
59
59
$(BUILD ) /extmod/ulab/code/% .o : CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY
60
+ ifeq ($(CIRCUITPY_ULAB_OPTIMIZE_SIZE ) ,1)
61
+ $(BUILD ) /extmod/ulab/code/% .o : CFLAGS += -Os
62
+ endif
60
63
endif
61
64
62
65
# py object files
You can’t perform that action at this time.
0 commit comments