From 4c8f357978bac1cda32b0e71d79ae54f655e8ce4 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 7 Jul 2019 17:38:22 -0700 Subject: [PATCH] Update to support updated FrankeNDK --- build.py | 6 +++--- native/jni/Android.mk | 1 + native/jni/Application.mk | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build.py b/build.py index 67b113572..f92f61fbd 100755 --- a/build.py +++ b/build.py @@ -218,9 +218,6 @@ def build_binary(args): with open(bin_file, 'rb') as src: binary_dump(src, out, 'magisk_xz') - if 'busybox' in args.target: - run_ndk_build('B_BB=1') - if 'magiskinit' in args.target: if not os.path.exists(os.path.join('native', 'out', 'x86', 'binaries_arch.h')): error('Build "magisk" before building "magiskinit"') @@ -235,6 +232,9 @@ def build_binary(args): if 'magiskboot' in args.target: run_ndk_build('B_BOOT=1') + if 'busybox' in args.target: + run_ndk_build('B_BB=1') + if 'test' in args.target: run_ndk_build('B_TEST=1 B_64BIT=1') diff --git a/native/jni/Android.mk b/native/jni/Android.mk index 9078e0fc8..378ab401b 100644 --- a/native/jni/Android.mk +++ b/native/jni/Android.mk @@ -160,6 +160,7 @@ LOCAL_C_INCLUDES := \ jni/include \ $(LIBUTILS) LOCAL_SRC_FILES := test.cpp +LOCAL_LDFLAGS := -static include $(BUILD_EXECUTABLE) endif diff --git a/native/jni/Application.mk b/native/jni/Application.mk index a3f7a5990..acfb5bcc3 100644 --- a/native/jni/Application.mk +++ b/native/jni/Application.mk @@ -17,8 +17,5 @@ endif # Busybox require some additional settings ifdef B_BB -APP_CFLAGS := -Os -fomit-frame-pointer -flto -APP_SHORT_COMMANDS := true -NDK_TOOLCHAIN_VERSION := 4.9 APP_PLATFORM := android-21 endif