Skip to content

Commit a7dbc3d

Browse files
committed
Android NDK r23
1 parent fd7c1be commit a7dbc3d

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

Diff for: base/docker-setup.sh

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ apt -y install git gnupg flex bison build-essential zip \
1919
libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig tofrodos \
2020
rsync dos2unix pbzip2
2121

22+
# For NDK
23+
apt -y install python3-pip python3-apt texinfo
24+
2225
# Set up user and working directory
2326
useradd build -m -s /bin/bash
2427
mkdir -p /home/build/wd

Diff for: ndk/build.sh

+11-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eu -o pipefail
44
pushd ../base && source ./setup.sh && popd
55

66
container_name="android-rebuilds-ndk"
7-
VERSION='ndk-release-r23'
7+
VERSION='r23'
88

99
docker create --name ${container_name} --workdir /home/build/wd --entrypoint "tail" android-rebuilds:base "-f" "/dev/null"
1010
docker start "${container_name}"
@@ -14,13 +14,15 @@ docker cp docker-build.sh "${container_name}":/home/build/wd/docker-build.sh
1414
docker exec --user build "${container_name}" bash -c "/home/build/wd/docker-build.sh"
1515

1616
# copy output
17+
docker cp "${container_name}":/home/build/wd/out/dist/android-ndk-0-linux-x86_64.zip android-ndk-${VERSION}-linux-x86_64.zip
18+
docker cp "${container_name}":/home/build/wd/out/dist/android-ndk-0-windows-x86_64.zip android-ndk-${VERSION}-windows-x86_64.zip
1719

1820
# shutdown and remove container
19-
# if docker ps --format '{{.Names}}' | grep -w "${container_name}" &> /dev/null; then
20-
# echo "Stopping container"
21-
# docker stop "${container_name}"
22-
# fi
23-
# if docker ps --all --format '{{.Names}}' | grep -w "${container_name}" &> /dev/null; then
24-
# echo "Removing container"
25-
# docker rm "${container_name}"
26-
# fi
21+
if docker ps --format '{{.Names}}' | grep -w "${container_name}" &> /dev/null; then
22+
echo "Stopping container"
23+
docker stop "${container_name}"
24+
fi
25+
if docker ps --all --format '{{.Names}}' | grep -w "${container_name}" &> /dev/null; then
26+
echo "Removing container"
27+
docker rm "${container_name}"
28+
fi

Diff for: ndk/docker-build.sh

+6-16
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,18 @@
22
set -eux -o pipefail
33

44
VERSION='r23' # temporarily before SDK 12 comes out formally
5-
# https://source.android.com/setup/build/building#choose-a-target
6-
TARGET='eng' # user, userdebug, eng
75

86
export USER=$(whoami)
9-
export BUILD_NUMBER="${TARGET}-${VERSION}"
107

118
# Sync sources
129
repo init -u https://android.googlesource.com/platform/manifest -b ndk-$VERSION --depth=1
1310
repo sync -c -j4
1411

15-
# Various fixes
16-
# Clone missing libraries
17-
18-
# Clean up and fixes
12+
# Fixes
13+
# Remove bundled python
14+
mv prebuilts/python3 prebuilts/python3-bak
1915

2016
# Build
21-
# build/envsetup.sh cannot be run with -u
22-
set +u
23-
source build/envsetup.sh
24-
lunch ndk_arm64-${TARGET}
25-
set -u
26-
27-
# win_sdk build linux SDK too
28-
#make -j$(nproc) sdk dist sdk_repo
29-
make -j$(nproc) win_sdk dist sdk_repo
17+
cd ndk
18+
python checkbuild.py --no-build-tests --package --system linux
19+
python checkbuild.py --no-build-tests --package --system windows64

0 commit comments

Comments
 (0)