blob: 1e7a3c1f15513f14f208f1f6d98fc2f4f0058b4d (
plain)
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
|
#!/bin/bash
set -x -e -v
MODE=${1?"First argument must be debug|release"}
pushd "${MOZ_FETCHES_DIR}"
mv wrench-deps/{vendor,.cargo} ${GECKO_PATH}/gfx/wr
popd
pushd "${GECKO_PATH}/gfx/wr/wrench"
# These things come from the toolchain dependencies of the job that invokes
# this script (webrender-wrench-android-build).
export PATH="${PATH}:${MOZ_FETCHES_DIR}/rustc/bin"
export PATH="${PATH}:${JAVA_HOME}/bin"
export ANDROID_SDK_ROOT="${MOZ_FETCHES_DIR}/android-sdk-linux"
export ANDROID_NDK_ROOT="${MOZ_FETCHES_DIR}/android-ndk"
if [ "$MODE" == "debug" ]; then
$MOZ_FETCHES_DIR/cargo-apk/cargo-apk apk build --frozen --verbose --lib
elif [ "$MODE" == "release" ]; then
$MOZ_FETCHES_DIR/cargo-apk/cargo-apk apk build --frozen --verbose --lib --release
else
echo "Unknown mode '${MODE}'; must be 'debug' or 'release'"
exit 1
fi
popd
|