mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
build: allow platform makefiles to configure ENABLE_LTO
This change introduces a lazily-evaluated condition on `ENABLE_LTO` to the `LTO_CFLAGS` variable as opposed to evaluating the condition eagerly. This concludes a recent request on the mailing list: https://lists.trustedfirmware.org/archives/list/tf-a@lists.trustedfirmware.org/thread/EU3XR4VB3RP2NQB372QPZ4VRP57ANNLC/ Change-Id: Ie1f73352eb51fb2ceb2385232336312216ef87fc Signed-off-by: Chris Kay <chris.kay@arm.com>
This commit is contained in:
parent
77ca4f7935
commit
fa402f38b2
1 changed files with 3 additions and 5 deletions
4
Makefile
4
Makefile
|
@ -155,11 +155,9 @@ ifneq ($(filter %-clang,$($(ARCH)-cc-id)),)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else ifeq ($($(ARCH)-cc-id),gnu-gcc)
|
else ifeq ($($(ARCH)-cc-id),gnu-gcc)
|
||||||
ifeq ($(ENABLE_LTO),1)
|
|
||||||
# Enable LTO only for aarch64
|
# Enable LTO only for aarch64
|
||||||
ifeq (${ARCH},aarch64)
|
ifeq (${ARCH},aarch64)
|
||||||
LTO_CFLAGS = -flto
|
LTO_CFLAGS = $(if $(filter-out 0,$(ENABLE_LTO)),-flto)
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif #(clang)
|
endif #(clang)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue