1 Star 0 Fork 12

chrisshangguan/distributed-build

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-feat-Adapt-to-Openeuler-python-export-lld.patch 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
tianhang 提交于 2023-06-12 14:05 . init and add patches for openeuler build
From e7e22adf4bc5b176e68a42298e478a353e664812 Mon Sep 17 00:00:00 2001
From: peng_langyuan <peng_langyuan@hoperun.com>
Date: Thu, 18 May 2023 16:10:29 +0800
Subject: [PATCH 01/11] =?UTF-8?q?feat(Adapt=20to=20Openeuler):=E6=9B=BF?=
=?UTF-8?q?=E6=8D=A2python=E8=B7=AF=E5=BE=84=20&&=20export=20lld=E8=B7=AF?=
=?UTF-8?q?=E5=BE=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chrisshangguan/distributed-build.git
git@gitee.com:chrisshangguan/distributed-build.git
chrisshangguan
distributed-build
distributed-build
master

搜索帮助