build: Add -flto to CXXFLAGS
Add -flto to CXXFLAGS to allow build optimization.
Change-Id: Id840a1bc41c8975d1bf3e64e06c4c470b8a6db2d
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/Makefile.am b/Makefile.am
index a0c64c6..9a7a000 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,8 @@
libswampd_la_CXXFLAGS = \
$(SDBUSPLUS_CFLAGS) \
$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS)
+ $(PHOSPHOR_LOGGING_CFLAGS) \
+ -flto
libswampd_la_SOURCES = \
notimpl/readonly.cpp \
@@ -81,6 +82,7 @@
-version-info 0:0:0 -shared
libmanualcmds_la_CXXFLAGS = $(SYSTEMD_CFLAGS) \
$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS)
+ $(PHOSPHOR_LOGGING_CFLAGS) \
+ -flto
SUBDIRS = . test