File tree Expand file tree Collapse file tree 3 files changed +4
-20
lines changed
Expand file tree Collapse file tree 3 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -732,4 +732,8 @@ if(EXECUTORCH_BUILD_VULKAN)
732732 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/vulkan)
733733endif ()
734734
735+ if (ANDROID)
736+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/android)
737+ endif ()
738+
735739include (Test .cmake)
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ set_target_properties(fbjni PROPERTIES
6161)
6262
6363set (executorch_DIR ${CMAKE_CURRENT_BINARY_DIR} /../../lib/cmake/ExecuTorch)
64- find_package (executorch CONFIG REQUIRED)
6564target_link_options_shared_lib(executorch)
6665
6766add_library (executorch_jni SHARED jni/jni_layer.cpp jni/log .cpp jni/jni_layer_runtime.cpp)
Original file line number Diff line number Diff line change @@ -71,25 +71,6 @@ build_android_native_library() {
7171 fi
7272 cmake --build " ${CMAKE_OUT} " -j " ${CMAKE_JOBS} " --target install --config " ${EXECUTORCH_CMAKE_BUILD_TYPE} "
7373
74- cmake extension/android \
75- -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK} /build/cmake/android.toolchain.cmake \
76- -DANDROID_ABI=" ${ANDROID_ABI} " \
77- -DANDROID_PLATFORM=android-26 \
78- -DBUILD_TESTING=OFF \
79- -DCMAKE_INSTALL_PREFIX=" ${CMAKE_OUT} " \
80- -DEXECUTORCH_ENABLE_LOGGING=ON \
81- -DEXECUTORCH_LOG_LEVEL=Info \
82- -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH \
83- -DEXECUTORCH_ANDROID_PROFILING=" ${EXECUTORCH_ANDROID_PROFILING:- OFF} " \
84- -DNEURON_BUFFER_ALLOCATOR_LIB=" $NEURON_BUFFER_ALLOCATOR_LIB " \
85- -DEXECUTORCH_BUILD_KERNELS_CUSTOM=" ${EXECUTORCH_BUILD_EXTENSION_LLM:- ON} " \
86- -DEXECUTORCH_BUILD_LLAMA_JNI=" ${EXECUTORCH_BUILD_EXTENSION_LLM:- ON} " \
87- -DSUPPORT_REGEX_LOOKAHEAD=ON \
88- -DCMAKE_BUILD_TYPE=" ${EXECUTORCH_CMAKE_BUILD_TYPE} " \
89- -B" ${CMAKE_OUT} " /extension/android
90-
91- cmake --build " ${CMAKE_OUT} " /extension/android -j " ${CMAKE_JOBS} " --config " ${EXECUTORCH_CMAKE_BUILD_TYPE} "
92-
9374 # Copy artifacts to ABI specific directory
9475 local SO_STAGE_DIR=" cmake-out-android-so/${ANDROID_ABI} "
9576 mkdir -p ${SO_STAGE_DIR}
You can’t perform that action at this time.
0 commit comments