From 7a4b81cf81403fdb2e3fd093274dd568d97d87f5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 6 Nov 2021 20:00:43 +0000 Subject: [PATCH] Add WITH_LTO build option, disabled by default Signed-off-by: falkTX --- source/Makefile.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/Makefile.mk b/source/Makefile.mk index d745b624d..61c6a2c36 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -85,6 +85,10 @@ BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden CXXFLAGS += -fvisibility-inlines-hidden endif +ifeq ($(WITH_LTO),true) +BASE_FLAGS += -fno-strict-aliasing -flto -ffat-lto-objects +endif + 32BIT_FLAGS = -m32 64BIT_FLAGS = -m64 ARM32_FLAGS = -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -mvectorize-with-neon-quad