65 lines
1.8 KiB
Diff
65 lines
1.8 KiB
Diff
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
|
|
|