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 7dc3c92deadbaf0e15d8e0135585b6e8cbc0e8c5..523c3629fc6709d3418068303311a7ef2fd289db 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