Browse Source

build: compile with -ffunction-sections, -fdata-sections and LTO

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich 5 years ago
parent
commit
a51413988c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Makefile

+ 2 - 2
Makefile

@@ -1,6 +1,6 @@
 IWINFO_BACKENDS    = $(BACKENDS)
-IWINFO_CFLAGS      = $(CFLAGS) -std=gnu99 -fstrict-aliasing -Iinclude
-IWINFO_LDFLAGS     = -luci -lubox -lubus
+IWINFO_CFLAGS      = $(CFLAGS) -std=gnu99 -fstrict-aliasing -ffunction-sections -fdata-sections -flto -Iinclude
+IWINFO_LDFLAGS     = -Wl,-gc-sections -flto -luci -lubox -lubus
 
 IWINFO_LIB         = libiwinfo.so
 IWINFO_LIB_LDFLAGS = $(LDFLAGS) -shared