From 2792f3de0e5e539c97d63d7ef6ae78ab37d341e2 Mon Sep 17 00:00:00 2001 From: hong19860320 <9973393+hong19860320@users.noreply.github.com> Date: Sat, 24 Aug 2019 21:10:11 +0800 Subject: [PATCH] add compiling script file for armlinux, and fix compiler errors (#1818) test=develop --- lite/tools/build_armlinux.sh | 39 ++++++++++++++++++++++++++++++++++++ lite/utils/logging.h | 1 + 2 files changed, 40 insertions(+) create mode 100755 lite/tools/build_armlinux.sh diff --git a/lite/tools/build_armlinux.sh b/lite/tools/build_armlinux.sh new file mode 100755 index 0000000000..3c240ccea9 --- /dev/null +++ b/lite/tools/build_armlinux.sh @@ -0,0 +1,39 @@ +#!/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 - diff --git a/lite/utils/logging.h b/lite/utils/logging.h index 095cdffc3e..c593bcf76b 100644 --- a/lite/utils/logging.h +++ b/lite/utils/logging.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "lite/utils/replace_stl/stream.h" // NOLINTFILE() -- GitLab