1 Star 0 Fork 4.7K

zhuzhihui7/xts_acts_napi_load

forked from OpenHarmony/xts_acts 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.sh 5.30 KB
一键复制 编辑 原始数据 按行查看 历史
冯强 提交于 2024-11-04 20:32 . rebuild entrance for accurate compile
#!/bin/bash
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
usage() {
echo
echo "USAGE"
echo " ./build.sh [suite=BUILD_TARGET] [target_os=TARGET_OS] [target_arch=TARGET_ARCH] [variant=BUILD_VARIANT] [target_subsystem=TARGET_SUBSYSTEM]"
echo " suite : BUILD_TARGET acts, hats, dcts"
echo " target_arch : TARGET_ARCH arm64 or arm, default value is arm"
echo " variant : BUILD_VARIANT release or debug, default value is debug"
echo " target_subsystem : TARGET_SUBSYSTEM the target subsystem to build"
echo " system_size : SYSTEM_SIZE standard"
echo " product_name : PRODUCT_NAME the name of product. such as Hi3516DV300, and so on."
echo
exit 1
}
parse_cmdline() {
BASE_HOME=$(dirname $(cd $(dirname $0); pwd))
BASE_HOME=${BASE_HOME}/../..
BUILD_TOOLS_DIR=${BASE_HOME}/prebuilts/build-tools/linux-x86/bin
OUT_DIR=${BASE_HOME}/out
BUILD_SHELL=${BASE_HOME}/build.sh
# build all parts for all products by default
BUILD_TARGET=""
GN_ARGS="is_dbt_test=true include_all=false"
TARGET_ARCH=arm
BUILD_VARIANT=release
UPLOAD_API_INFO=False
SYSTEM_SIZE=standard
PRODUCT_NAME=""
PR_PARTH_LIST=""
USE_MUSL=false
export PATH=${BASE_HOME}/prebuilts/python/linux-x86/3.11.4/bin:$PATH
system_build_params="build_xts=true"
while [ -n "$1" ]; do
var="$1"
OPTIONS=${var%%=*}
PARAM=${var#*=}
echo "OPTIONS=$OPTIONS"
echo "PARAM=$PARAM"
echo "-------------------"
case "$OPTIONS" in
suite) BUILD_TARGET="$PARAM"
;;
target_arch) TARGET_ARCH="$PARAM"
;;
variant) BUILD_VARIANT="$PARAM"
;;
use_musl) USE_MUSL="$PARAM"
;;
target_subsystem) export target_subsystem=${PARAM}
;;
system_size) SYSTEM_SIZE="$PARAM"
;;
product_name) PRODUCT_NAME="$PARAM"
;;
pr_path_list) PR_PARTH_LIST="$PARAM"
;;
upload_api_info) UPLOAD_API_INFO=$(echo $PARAM |tr [a-z] [A-Z])
;;
cache_type) CACHE_TYPE="$PARAM"
;;
*) usage
break;;
esac
shift
done
if [ "$SYSTEM_SIZE" = "standard" ]; then
BUILD_TARGET=${BUILD_TARGET:-"test/xts/acts:xts_acts"}
PRODUCT_NAME=${PRODUCT_NAME:-"Hi3516DV300"}
else
BUILD_TARGET=${BUILD_TARGET:-"acts acts_ivi acts_intellitv acts_wearable"}
PRODUCT_NAME=${PRODUCT_NAME:-"arm64"}
fi
}
do_make() {
BUILD_TARGET=$(echo "$BUILD_TARGET" | sed 's/,/ /g')
echo "BUILD_TARGET: $BUILD_TARGET"
cd $BASE_HOME
ACTS_ROOT="$BASE_HOME/test/xts/acts"
static_check_dir="${BASE_HOME}/test/xts/tools/standard_check"
python3 -B ${static_check_dir}/check_hvigor.py acts
if [ "$?" != 0 ]; then
exit 1
fi
rm -rf "$BASE_HOME/test/xts/autogen_apiobjs"
export XTS_SUITENAME=acts
if [ "$SYSTEM_SIZE" = "standard" ]; then
MUSL_ARGS=""
if [ "$PRODUCT_NAME" = "m40" ]; then
if [ "$USE_MUSL" = "false" ]; then
MUSL_ARGS="--gn-args use_musl=false --gn-args use_custom_libcxx=true --gn-args use_custom_clang=true"
fi
fi
CACHE_ARG=""
if [ "$CACHE_TYPE" == "xcache" ];then
CACHE_ARG="--ccache false --xcache true"
fi
if [ "$PR_PARTH_LIST" != "" ]; then
system_build_params+=" pr_path_list=$PR_PARTH_LIST"
fi
./build.sh --product-name $PRODUCT_NAME --gn-args $system_build_params --build-target $BUILD_TARGET --build-target "deploy_testtools" --gn-args is_standard_system=true $MUSL_ARGS --target-cpu $TARGET_ARCH --get-warning-list=false --stat-ccache=true --compute-overlap-rate=false --deps-guard=false $CACHE_ARG --gn-args skip_generate_module_list_file=true
else
if [ "$BUILD_TARGET" = "acts acts_ivi acts_intellitv acts_wearable" ]; then
./build.sh --product-name $PRODUCT_NAME --gn-args $system_build_params --build-target "acts" --build-target "acts_ivi" --build-target "acts_intellitv" --build-target "acts_wearable" --build-target "deploy_testtools"
else
./build.sh --product-name $PRODUCT_NAME --gn-args $system_build_params --build-target $BUILD_TARGET --build-target "deploy_testtools"
fi
fi
ret=$?
rm -rf "$BASE_HOME/test/xts/autogen_apiobjs"
if [ "$ret" != 0 ]; then
echo "build error"
exit 1
fi
}
parse_cmdline $@
do_make
exit 0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/zhuzhihui7/xts_acts_napi_load.git
git@gitee.com:zhuzhihui7/xts_acts_napi_load.git
zhuzhihui7
xts_acts_napi_load
xts_acts_napi_load
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385