Merge "build: allow platform makefiles to configure ENABLE_LTO" into integration

This commit is contained in:
Bipin Ravi 2024-03-05 16:31:28 +01:00 committed by TrustedFirmware Code Review
commit 58843f25d3

View file

@ -155,11 +155,9 @@ ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
endif
else ifeq ($($(ARCH)-cc-id),gnu-gcc)
ifeq ($(ENABLE_LTO),1)
# Enable LTO only for aarch64
ifeq (${ARCH},aarch64)
LTO_CFLAGS = -flto
endif
# Enable LTO only for aarch64
ifeq (${ARCH},aarch64)
LTO_CFLAGS = $(if $(filter-out 0,$(ENABLE_LTO)),-flto)
endif
endif #(clang)