1 Star 0 Fork 12

zhangxianting/distributed-build

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-feat-Adapt-to-Openeuler-python-export-lld.patch 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
zxstty 提交于 2023-12-06 15:52 +08:00 . change by zjq
From 9d1e0dcc61af68410c3662c64553c8235385d4d1 Mon Sep 17 00:00:00 2001
From: zxstty <zhaojiaqi18@huawei.com>
Date: Thu, 9 Nov 2023 11:10:52 +0800
Subject: [PATCH] 0001
---
build_scripts/build.sh | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/build_scripts/build.sh b/build_scripts/build.sh
index cd2ab20..51f2e5e 100755
--- a/build_scripts/build.sh
+++ b/build_scripts/build.sh
@@ -109,8 +109,27 @@ case $(uname -s) in
exit $RET
esac
+args=$@
+while test $# -gt 0
+do
+ case "$1" in --product-name)
+ shift
+ product_name=$1
+ ;;
+ *)
+ shift
+ ;;
+ esac
+done
+
# set python3
-PYTHON3_DIR=${source_root_dir}/prebuilts/python/${HOST_DIR}/3.9.2/
+if [ "$product_name" == "openeuler" ]; then
+ PYTHON3_DIR=/usr
+ LLD_PATH=/usr/lib64/llvm15/bin
+else
+ PYTHON3_DIR=${source_root_dir}/prebuilts/python/${HOST_DIR}/3.9.2/
+ LLD_PATH=""
+fi
PYTHON3=${PYTHON3_DIR}/bin/python3
PYTHON=${PYTHON3_DIR}/bin/python
if [[ ! -f "${PYTHON3}" ]]; then
@@ -122,11 +141,11 @@ else
fi
fi
-export PATH=${source_root_dir}/prebuilts/build-tools/${HOST_DIR}/bin:${PYTHON3_DIR}/bin:$PATH
+export PATH=${source_root_dir}/prebuilts/build-tools/${HOST_DIR}/bin:${PYTHON3_DIR}/bin:${LLD_PATH}:$PATH
${PYTHON3} ${source_root_dir}/build/scripts/tools_checker.py
-${PYTHON3} ${source_root_dir}/build/scripts/entry.py --source-root-dir ${source_root_dir} $@
+${PYTHON3} ${source_root_dir}/build/scripts/entry.py --source-root-dir ${source_root_dir} $args
if [[ "$?" -ne 0 ]]; then
echo -e "\033[31m=====build ${product_name} error=====\033[0m"
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangxianting/distributed-build.git
git@gitee.com:zhangxianting/distributed-build.git
zhangxianting
distributed-build
distributed-build
master

搜索帮助