mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-07-18 17:34:40 -04:00
[CI] modify build config
1、Fix LLVM commit info in version number.
2、Modify static source download url.
3、Use LLVM code downloaded through repo.
Signed-off-by: wuhuiquan <wuhuiquan4@huawei.com>
This commit is contained in:
@@ -85,7 +85,7 @@ move_static_rust_source() {
|
||||
download_rust_static_source() {
|
||||
local pre_rust_date="2023-07-13"
|
||||
mkdir -p ${rust_static_dir} ${rust_source_dir}/build/cache/${pre_rust_date}
|
||||
local rust_down_net="https://mirrors.ustc.edu.cn/rust-static/dist"
|
||||
local rust_down_net="https://repo.huaweicloud.com/harmonyos/compiler/rust"
|
||||
pushd ${rust_static_dir}
|
||||
local platform=$1
|
||||
local cpu=$2
|
||||
@@ -94,11 +94,11 @@ download_rust_static_source() {
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [ ! -e "${file}" ]; then
|
||||
curl -O -k -m 300 ${rust_down_net}/${pre_rust_date}/${file} &
|
||||
curl -O -k -m 300 ${rust_down_net}/1.71.0/${file} &
|
||||
fi
|
||||
done
|
||||
if [ ! -e "rustc-1.72.0-src.tar.gz" ]; then
|
||||
curl -O -k -m 300 ${rust_down_net}/rustc-1.72.0-src.tar.gz &
|
||||
curl -O -k -m 300 ${rust_down_net}/1.72.0/rustc-1.72.0-src.tar.gz &
|
||||
fi
|
||||
wait
|
||||
popd
|
||||
|
||||
@@ -16,10 +16,10 @@ new_version="xxxxx"
|
||||
source ${shell_path}/function.sh
|
||||
|
||||
get_new_version() {
|
||||
pushd ${root_build_dir}/../harmony/llvm/
|
||||
pushd ${root_build_dir}/third_party/llvm-project/
|
||||
local commit_id_full=$(git rev-parse HEAD)
|
||||
local commit_id_short=${commit_id_full:1:10}
|
||||
new_version="OHOS llvm-preject $commit_id_short"
|
||||
local commit_id_short=${commit_id_full:0:10}
|
||||
new_version="OHOS llvm-project $commit_id_short"
|
||||
popd
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ main() {
|
||||
move_static_rust_source ${rust_static_dir} ${rust_source_dir}
|
||||
|
||||
rm -rf ${rust_source_dir}/src/llvm-project/*
|
||||
cp -r ${root_build_dir}/../harmony/llvm/* ${rust_source_dir}/src/llvm-project/
|
||||
cp -r ${root_build_dir}/third_party/llvm-project/* ${rust_source_dir}/src/llvm-project/
|
||||
|
||||
pushd ${rust_source_dir}
|
||||
export_ohos_path
|
||||
|
||||
@@ -23,7 +23,7 @@ main() {
|
||||
move_static_rust_source ${rust_static_dir} ${rust_source_dir}
|
||||
|
||||
rm -rf ${rust_source_dir}/src/llvm-project/*
|
||||
cp -r ${root_build_dir}/../harmony/llvm/* ${rust_source_dir}/src/llvm-project/
|
||||
cp -r ${root_build_dir}/third_party/llvm-project/* ${rust_source_dir}/src/llvm-project/
|
||||
|
||||
pushd ${rust_source_dir}
|
||||
export_ohos_path
|
||||
|
||||
Reference in New Issue
Block a user