ubus: compile with LTO enabled
authorFelix Fietkau <nbd@nbd.name>
Wed, 11 Jul 2018 17:42:40 +0000 (19:42 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 13 Jul 2018 15:22:53 +0000 (17:22 +0200)
Reduces total .ipk size by about 1k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/system/ubus/Makefile

index 7dc3c92..523c362 100644 (file)
@@ -47,7 +47,8 @@ define Package/libubus-lua
   TITLE:=Lua binding for the OpenWrt RPC client
 endef
 
-TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -flto
+TARGET_LDFLAGS += -flto
 
 CMAKE_OPTIONS = \
        -DLUAPATH=/usr/lib/lua