forked from topjohnwu/ondk
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommon.sh
More file actions
34 lines (27 loc) · 784 Bytes
/
common.sh
File metadata and controls
34 lines (27 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 2022 Google LLC.
# SPDX-License-Identifier: Apache-2.0
RUST_VERSION='beta'
NDK_VERSION='r24'
OUTPUT_VERSION='r24.0'
RUST_CLANG='14.0.0'
NDK_CLANG='14.0.1'
clone() {
git clone --depth 1 --branch $RUST_VERSION https://github.com/rust-lang/rust.git
cd rust
git submodule update --init --depth=1
patch -p1 < ../patches/patch-bootstrap-native.patch
patch -p1 < ../patches/forced-vendored-openssl.patch
if [ $OS = 'darwin' ]; then
# Dirty fix of llvm-config for macOS
cd src/llvm-project
patch -p1 < ../../../patches/fix-llvm-config.patch
cd ../../
fi
cd ../
}
dist() {
echo $OUTPUT_VERSION > ndk/ONDK_VERSION
mv ndk "ondk-${OUTPUT_VERSION}"
mkdir dist
tar zcf "dist/ondk-${OUTPUT_VERSION}-${OS}.tar.gz" "ondk-${OUTPUT_VERSION}"
}