diff --git a/lite/CMakeLists.txt b/lite/CMakeLists.txt index 7606507fba471b0bd18e7ea6e71ca498204b385f..c77d70a7f31976ccb37c2968c5cf5be8575c7da9 100644 --- a/lite/CMakeLists.txt +++ b/lite/CMakeLists.txt @@ -90,7 +90,7 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) COMMAND ${CMAKE_STRIP} "--strip-debug" ${INFER_LITE_PUBLISH_ROOT}/cxx/lib/*.a) endif() else() - if (IOS) + if (IOS OR (ARM_TARGET_OS STREQUAL "armlinux")) add_custom_target(tiny_publish_lib ${TARGET} COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/lib" COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/include" diff --git a/lite/tools/build.sh b/lite/tools/build.sh index 0edeeeede37b1026c4752dfff33bfc743a0de4aa..0860f3d00e951d9a14cc484ca292dae19b892d2a 100755 --- a/lite/tools/build.sh +++ b/lite/tools/build.sh @@ -14,6 +14,7 @@ readonly NUM_PROC=${LITE_BUILD_THREADS:-4} # global variables BUILD_EXTRA=OFF +BUILD_JAVA=ON readonly THIRDPARTY_TAR=https://paddle-inference-dist.bj.bcebos.com/PaddleLite/third-party-05b862.tar.gz @@ -62,10 +63,14 @@ function make_tiny_publish_so { mkdir -p $build_dir cd $build_dir + if [ ${os} == "armlinux" ]; then + BUILD_JAVA=OFF + fi + cmake .. \ ${CMAKE_COMMON_OPTIONS} \ -DWITH_TESTING=OFF \ - -DLITE_WITH_JAVA=ON \ + -DLITE_WITH_JAVA=$BUILD_JAVA \ -DLITE_SHUTDOWN_LOG=ON \ -DLITE_ON_TINY_PUBLISH=ON \ -DANDROID_STL_TYPE=$android_stl \ @@ -93,12 +98,16 @@ function make_full_publish_so { fi mkdir -p $build_dir cd $build_dir + + if [ ${os} == "armlinux" ]; then + BUILD_JAVA=OFF + fi prepare_workspace cmake .. \ ${CMAKE_COMMON_OPTIONS} \ -DWITH_TESTING=OFF \ - -DLITE_WITH_JAVA=ON \ + -DLITE_WITH_JAVA=$BUILD_JAVA \ -DLITE_SHUTDOWN_LOG=ON \ -DANDROID_STL_TYPE=$android_stl \ -DLITE_BUILD_EXTRA=$BUILD_EXTRA \ diff --git a/lite/tools/build_armlinux.sh b/lite/tools/build_armlinux.sh deleted file mode 100755 index 3c240ccea9ec9b95de90f1dc7211cdf5cd3cce1a..0000000000000000000000000000000000000000 --- a/lite/tools/build_armlinux.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -os=armlinux -abi=armv8 -lang=gcc - -if [ x$1 != x ]; then - abi=$1 -fi - -if [ x$2 != x ]; then - lang=$2 -fi - -cur_dir=$(pwd) -build_dir=$cur_dir/build.lite.${os}.${abi}.${lang} -mkdir -p $build_dir -cd $build_dir - -GEN_CODE_PATH_PREFIX=lite/gen_code -mkdir -p ./${GEN_CODE_PATH_PREFIX} -touch ./${GEN_CODE_PATH_PREFIX}/__generated_code__.cc - -cmake .. \ - -DWITH_GPU=OFF \ - -DWITH_MKL=OFF \ - -DWITH_LITE=ON \ - -DLITE_WITH_CUDA=OFF \ - -DLITE_WITH_X86=OFF \ - -DLITE_WITH_ARM=ON \ - -DWITH_ARM_DOTPROD=ON \ - -DLITE_WITH_OPENMP=ON \ - -DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=ON \ - -DWITH_TESTING=ON \ - -DARM_TARGET_OS=${os} -DARM_TARGET_ARCH_ABI=${abi} -DARM_TARGET_LANG=${lang} - -make -j4 publish_inference - -cd -