From 1cf0bfbea92b8262956a7a2bda2c5bf4792306d9 Mon Sep 17 00:00:00 2001 From: Lionel Debroux Date: Sat, 7 Sep 2019 22:44:12 +0200 Subject: [PATCH] [scripts] Use --gc-sections linker flag even when building with LTO. This saves more than 1 KB on a N0110 build here. --- build/toolchain.arm-gcc.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/toolchain.arm-gcc.mak b/build/toolchain.arm-gcc.mak index cf97404d1..2983111c6 100644 --- a/build/toolchain.arm-gcc.mak +++ b/build/toolchain.arm-gcc.mak @@ -20,7 +20,7 @@ endif ifeq ($(LTO),1) # Use link-time optimization if LTO=1 -SFLAGS += -flto +SFLAGS += -flto -Wl,--gc-sections else # Otherwise, just get rid of unused symbols LDFLAGS += -Wl,--gc-sections