Fix scripts

This commit is contained in:
topjohnwu 2024-05-05 11:17:07 -07:00
parent 6d99867f31
commit c79883941b
4 changed files with 11 additions and 17 deletions

View File

@ -3,8 +3,6 @@
# Copyright 2022-2024 Google LLC. # Copyright 2022-2024 Google LLC.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
set -e
if ! uname | grep -q 'MINGW64_NT'; then if ! uname | grep -q 'MINGW64_NT'; then
echo 'This script should run on MSYS2 bash' echo 'This script should run on MSYS2 bash'
echo echo

View File

@ -3,8 +3,6 @@
# Copyright 2022-2024 Google LLC. # Copyright 2022-2024 Google LLC.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
set -e
. common.sh . common.sh
OS=$(uname | tr '[:upper:]' '[:lower:]') OS=$(uname | tr '[:upper:]' '[:lower:]')

View File

@ -1,10 +0,0 @@
#!/usr/bin/env bash
# Copyright 2022-2023 Google LLC.
# SPDX-License-Identifier: Apache-2.0
set -e
rm -rf rust llvm-project llvm_android toolchain-utils\
out out.arm out.x86 ndk tmp mingw64 \
android-ndk-*.zip ondk-* dist mingw.7z

View File

@ -17,6 +17,9 @@ OUTPUT_VERSION='r27.0'
PYTHON_CMD='python3' PYTHON_CMD='python3'
set -e
shopt -s nullglob
# url sha # url sha
git_clone_sha() { git_clone_sha() {
local dir=${1##*/} local dir=${1##*/}
@ -36,9 +39,9 @@ git_clone_branch() {
clone() { clone() {
git_clone_branch https://github.com/rust-lang/rust $RUST_VERSION git_clone_branch https://github.com/rust-lang/rust $RUST_VERSION
cd rust cd rust
# for p in ../patches/*.patch; do for p in ../patches/*.patch; do
# patch -p1 < $p patch -p1 < $p
# done done
# Skip rust llvm # Skip rust llvm
sed 's:\[submodule "src/llvm-project"\]:&\n\tupdate = none:' .gitmodules > .gitmodules.p sed 's:\[submodule "src/llvm-project"\]:&\n\tupdate = none:' .gitmodules > .gitmodules.p
mv .gitmodules.p .gitmodules mv .gitmodules.p .gitmodules
@ -117,6 +120,11 @@ run_cmd() {
rm -rf dist ondk-* rm -rf dist ondk-*
dist dist
;; ;;
clean)
rm -rf rust llvm-project llvm_android toolchain-utils \
out out.arm out.x86 ndk tmp mingw64 \
android-ndk-*.zip ondk-* dist mingw.7z
;;
*) *)
echo "Unknown action \"$1\"" echo "Unknown action \"$1\""
echo "./build.sh clone/build/ndk/dist" echo "./build.sh clone/build/ndk/dist"