From 4b7ce2d670938d1d00e289746789bf78b4517cb8 Mon Sep 17 00:00:00 2001 From: Roger Light Date: Mon, 18 Oct 2021 00:17:29 +0100 Subject: [PATCH] Optional Link Time Optimisation. --- config.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config.mk b/config.mk index 8ef7aa10..8a2b0af1 100644 --- a/config.mk +++ b/config.mk @@ -130,6 +130,9 @@ WITH_XTREPORT=no # check routine. See src/keepalive.c for notes on this. WITH_OLD_KEEPALIVE=no +# Use link time optimisation +WITH_LTO=yes + # ============================================================================= # End of user configuration # ============================================================================= @@ -279,6 +282,11 @@ ifeq ($(WITH_BRIDGE),yes) BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_BRIDGE endif +ifeq ($(WITH_LTO),yes) + BROKER_CFLAGS:=$(BROKER_CFLAGS) -flto + BROKER_LDFLAGS:=$(BROKER_LDFLAGS) -flto +endif + ifeq ($(WITH_PERSISTENCE),yes) BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_PERSISTENCE endif