From 72df7056f5d26f961cebb125e54a7af4766399e2 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 22 Aug 2019 20:22:11 +0200 Subject: [PATCH] Use LTO for the Cydia build --- binr/blob/Makefile | 3 +++ sys/ios-cydia.sh | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/binr/blob/Makefile b/binr/blob/Makefile index 60fe3194d2..905389b55f 100644 --- a/binr/blob/Makefile +++ b/binr/blob/Makefile @@ -19,6 +19,9 @@ LDFLAGS+=-lpthread LDFLAGS+=-ldl endif endif +ifeq ($(USE_LTO),1) +LDFLAGS+=-flto +endif CFLAGS+=-I../../libr/include/ CFLAGS+=-I$(SHLR)/spp diff --git a/sys/ios-cydia.sh b/sys/ios-cydia.sh index f57c58e96d..04979e8cf5 100755 --- a/sys/ios-cydia.sh +++ b/sys/ios-cydia.sh @@ -110,8 +110,11 @@ else time make -j4 if [ "$static" = 1 ]; then rm -f libr/*/*.dylib - ( cd binr ; make clean ; - cd blob ; make -j 4) + ( + cd binr ; make clean ; + cd blob ; make USE_LTO=1 + xcrun --sdk iphoneos strip radare2 + ) fi if [ $? = 0 ]; then makeDeb