Optimize ulab for size on samd51/same51
This commit is contained in:
parent
164fcb22c2
commit
8579766ede
@ -106,6 +106,7 @@ CIRCUITPY_PS2IO ?= 1
|
||||
CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FRAMEBUFFERIO)
|
||||
CIRCUITPY_SAMD ?= 1
|
||||
CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12
|
||||
CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 1
|
||||
CIRCUITPY_WATCHDOG ?= 1
|
||||
|
||||
endif # samd51
|
||||
@ -131,6 +132,7 @@ CIRCUITPY_SAMD ?= 1
|
||||
CIRCUITPY_FLOPPYIO ?= $(CIRCUITPY_FULL_BUILD)
|
||||
CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD)
|
||||
CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FRAMEBUFFERIO)
|
||||
CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 1
|
||||
|
||||
endif # same51
|
||||
######################################################################
|
||||
|
@ -559,6 +559,9 @@ CFLAGS += -DCIRCUITPY_ZLIB=$(CIRCUITPY_ZLIB)
|
||||
CIRCUITPY_ULAB ?= $(CIRCUITPY_FULL_BUILD)
|
||||
CFLAGS += -DCIRCUITPY_ULAB=$(CIRCUITPY_ULAB)
|
||||
|
||||
# whether to use -Os optimization on files in ulab
|
||||
CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 0
|
||||
|
||||
# CIRCUITPY_VIDEOCORE is handled in the broadcom tree.
|
||||
# Only for Broadcom chips.
|
||||
# Assume not a Broadcom build.
|
||||
|
3
py/py.mk
3
py/py.mk
@ -57,6 +57,9 @@ ULAB_SRCS := $(shell find $(TOP)/extmod/ulab/code -type f -name "*.c")
|
||||
SRC_MOD += $(patsubst $(TOP)/%,%,$(ULAB_SRCS))
|
||||
CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -DULAB_HAS_USER_MODULE=0 -iquote $(TOP)/extmod/ulab/code
|
||||
$(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
|
||||
ifeq ($(CIRCUITPY_ULAB_OPTIMIZE_SIZE),1)
|
||||
$(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Os
|
||||
endif
|
||||
endif
|
||||
|
||||
# py object files
|
||||
|
Loading…
x
Reference in New Issue
Block a user