From f8b783520442f81086ec65e638d44c6be3b8ff94 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Tue, 22 Oct 2024 14:48:28 -0700 Subject: [PATCH] Update [ghstack-poisoned] --- build/build_android_llm_demo.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/build_android_llm_demo.sh b/build/build_android_llm_demo.sh index 3f80d379b4a..1f8a554edc2 100644 --- a/build/build_android_llm_demo.sh +++ b/build/build_android_llm_demo.sh @@ -112,6 +112,9 @@ build_aar() { # Rename libexecutorch_jni.so to libexecutorch.so for soname consistency # between Java and JNI find jni -type f -name "libexecutorch_jni.so" -exec bash -c 'mv "$1" "${1/_jni/}"' bash {} \; + if [ "$EXECUTORCH_CMAKE_BUILD_TYPE" == "Release" ]; then + find jni -type f -name "*.so" -exec "$ANDROID_NDK"/toolchains/llvm/prebuilt/*/bin/llvm-strip {} \; + fi # Zip all necessary files into the AAR file zip -r executorch.aar libs jni/*/libexecutorch.so jni/*/libqnn*.so jni/*/libQnn*.so jni/*/libneuron_backend.so jni/*/libneuron_buffer_allocator.so jni/*/libneuronusdk_adapter.mtk.so AndroidManifest.xml popd