提交 f1252590 编写于 作者: G guofei 提交者: hong19860320

lite can build armlinux and remove build_armlinux.sh test=develop (#1932)

上级 6dbc2f29
...@@ -90,7 +90,7 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM) ...@@ -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) COMMAND ${CMAKE_STRIP} "--strip-debug" ${INFER_LITE_PUBLISH_ROOT}/cxx/lib/*.a)
endif() endif()
else() else()
if (IOS) if (IOS OR (ARM_TARGET_OS STREQUAL "armlinux"))
add_custom_target(tiny_publish_lib ${TARGET} add_custom_target(tiny_publish_lib ${TARGET}
COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/lib" COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/lib"
COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/include" COMMAND mkdir -p "${INFER_LITE_PUBLISH_ROOT}/include"
......
...@@ -14,6 +14,7 @@ readonly NUM_PROC=${LITE_BUILD_THREADS:-4} ...@@ -14,6 +14,7 @@ readonly NUM_PROC=${LITE_BUILD_THREADS:-4}
# global variables # global variables
BUILD_EXTRA=OFF BUILD_EXTRA=OFF
BUILD_JAVA=ON
readonly THIRDPARTY_TAR=https://paddle-inference-dist.bj.bcebos.com/PaddleLite/third-party-05b862.tar.gz 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 { ...@@ -62,10 +63,14 @@ function make_tiny_publish_so {
mkdir -p $build_dir mkdir -p $build_dir
cd $build_dir cd $build_dir
if [ ${os} == "armlinux" ]; then
BUILD_JAVA=OFF
fi
cmake .. \ cmake .. \
${CMAKE_COMMON_OPTIONS} \ ${CMAKE_COMMON_OPTIONS} \
-DWITH_TESTING=OFF \ -DWITH_TESTING=OFF \
-DLITE_WITH_JAVA=ON \ -DLITE_WITH_JAVA=$BUILD_JAVA \
-DLITE_SHUTDOWN_LOG=ON \ -DLITE_SHUTDOWN_LOG=ON \
-DLITE_ON_TINY_PUBLISH=ON \ -DLITE_ON_TINY_PUBLISH=ON \
-DANDROID_STL_TYPE=$android_stl \ -DANDROID_STL_TYPE=$android_stl \
...@@ -93,12 +98,16 @@ function make_full_publish_so { ...@@ -93,12 +98,16 @@ function make_full_publish_so {
fi fi
mkdir -p $build_dir mkdir -p $build_dir
cd $build_dir cd $build_dir
if [ ${os} == "armlinux" ]; then
BUILD_JAVA=OFF
fi
prepare_workspace prepare_workspace
cmake .. \ cmake .. \
${CMAKE_COMMON_OPTIONS} \ ${CMAKE_COMMON_OPTIONS} \
-DWITH_TESTING=OFF \ -DWITH_TESTING=OFF \
-DLITE_WITH_JAVA=ON \ -DLITE_WITH_JAVA=$BUILD_JAVA \
-DLITE_SHUTDOWN_LOG=ON \ -DLITE_SHUTDOWN_LOG=ON \
-DANDROID_STL_TYPE=$android_stl \ -DANDROID_STL_TYPE=$android_stl \
-DLITE_BUILD_EXTRA=$BUILD_EXTRA \ -DLITE_BUILD_EXTRA=$BUILD_EXTRA \
......
#!/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 -
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册