diff --git a/rust_build.sh b/rust_build.sh index d56d40e1496a4c1e85e2db1782df9db1a9a201db..a842387463aa92a854d94c306614b4310f0ca60a 100644 --- a/rust_build.sh +++ b/rust_build.sh @@ -3,6 +3,18 @@ set -e CURRENT_DIR=$(pwd) +mkdir -p ~/.cargo && touch ~/.cargo/config.toml && chmod 777 ~/.cargo/config.toml +cat > ~/.cargo/config.toml < /dev/null # 获取rust_std包 mkdir -p build/cache/2025-01-09 @@ -76,26 +88,18 @@ pushd $CURRENT_DIR > /dev/null mkdir -p library/backtrace fi cp -rf tmp_rust/library/backtrace/* library/backtrace/ - - cat > ~/.cargo/config < build.log - python3 x.py build --stage 2 >> build.log - echo "stage2 build end" >> build.log + echo "stage2 build start ..." + python3 x.py build --stage 2 + echo "stage2 build end" - echo "dist rust-dev build start ..." >> build.log - python3 x.py dist rustc cargo rustfmt clippy rust-analyzer miri llvm-tools >> build.log - python3 x.py dist >> build.log - echo "dist rust build end" >> build.log + echo "dist rust-dev build start ..." + python3 x.py dist rustc cargo rustfmt clippy rust-analyzer miri llvm-tools + python3 x.py dist + echo "dist rust build end" popd > /dev/null -EXTRA_PATH = $CURRENT_DIR/extra +EXTRA_PATH=$CURRENT_DIR/extra pushd $EXTRA_PATH/rustlib > /dev/null unzip src.zip popd > /dev/null @@ -107,6 +111,7 @@ fi echo "start add extra files" pushd $CURRENT_DIR/build/dist > /dev/null + ls -alh $CURRENT_DIR/build/dist/ tar -zxvf rust-1.85.0-dev-x86_64-unknown-linux-gnu.tar.gz package_dir="rust-1.85.0-dev-x86_64-unknown-linux-gnu" pushd rust-1.85.0-dev-x86_64-unknown-linux-gnu > /dev/null