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