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
106106CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FRAMEBUFFERIO )
107107CIRCUITPY_SAMD ?= 1
108108CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12
109+ CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 1
109110CIRCUITPY_WATCHDOG ?= 1
110111
111112endif # samd51
@@ -131,6 +132,7 @@ CIRCUITPY_SAMD ?= 1
131132CIRCUITPY_FLOPPYIO ?= $(CIRCUITPY_FULL_BUILD )
132133CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD )
133134CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FRAMEBUFFERIO )
135+ CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 1
134136
135137endif # same51
136138# #####################################################################
Original file line number Diff line number Diff line change @@ -559,6 +559,9 @@ CFLAGS += -DCIRCUITPY_ZLIB=$(CIRCUITPY_ZLIB)
559559CIRCUITPY_ULAB ?= $(CIRCUITPY_FULL_BUILD )
560560CFLAGS += -DCIRCUITPY_ULAB=$(CIRCUITPY_ULAB )
561561
562+ # whether to use -Os optimization on files in ulab
563+ CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 0
564+
562565# CIRCUITPY_VIDEOCORE is handled in the broadcom tree.
563566# Only for Broadcom chips.
564567# 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")
5757SRC_MOD += $(patsubst $(TOP ) /% ,% ,$(ULAB_SRCS ) )
5858CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -DULAB_HAS_USER_MODULE=0 -iquote $(TOP ) /extmod/ulab/code
5959$(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
6063endif
6164
6265# py object files
You can’t perform that action at this time.
0 commit comments