rbcodec: Force use of -O2 for dsp code

We already use targeted optimization for most codecs, and the
DSP code is just as performance-sensitive.

Improves mp3 decoding performance by a whopping 1% wwhen PBE is
turned on.

Change-Id: I801a6624c0f7068b6cd67961ad3b08f809b92fca
This commit is contained in:
Solomon Peachy 2025-08-12 09:04:58 -04:00
parent 4de25f7020
commit e4e50e36f1

View file

@ -22,4 +22,9 @@ CORE_LIBS := $(RBCODECLIB) $(CORE_LIBS)
$(RBCODECLIB): $(RBCODECLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
# Force use of -O2 for DSP code
ifneq ($(MEMORYSIZE),2)
$(BUILDDIR)/lib/rbcodec/dsp/%: CFLAGS += -O2
endif
include $(RBCODECLIB_DIR)/codecs/codecs.make