aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2016-10-19 14:17:19 -0700
committerDan Albert <danalbert@google.com>2016-10-19 14:35:15 -0700
commit65780b2c241a90cd5074b89976ebaac8fc850165 (patch)
treef66f733fdcb9e231278732081ef281128afe44c7 /scripts
parent4098deb0b856476d849b46ba7ce0a45b655c62df (diff)
downloadbuild_soong-65780b2c241a90cd5074b89976ebaac8fc850165.tar.gz
build_soong-65780b2c241a90cd5074b89976ebaac8fc850165.tar.bz2
build_soong-65780b2c241a90cd5074b89976ebaac8fc850165.zip
Add a script to build the NDK prebuilts.
Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \ ./build/soong/scripts/build-ndk-prebuilts.sh Bug: None Change-Id: I3c930d2ec4d73196e355b90766eb14f0f0361460
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-ndk-prebuilts.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/build-ndk-prebuilts.sh b/scripts/build-ndk-prebuilts.sh
new file mode 100755
index 00000000..cc418d4b
--- /dev/null
+++ b/scripts/build-ndk-prebuilts.sh
@@ -0,0 +1,25 @@
+#!/bin/bash -ex
+
+if [ -z "${OUT_DIR}" ]; then
+ echo Must set OUT_DIR
+ exit 1
+fi
+
+TOP=$(pwd)
+
+SOONG_OUT=${OUT_DIR}/soong
+SOONG_NDK_OUT=${OUT_DIR}/soong/ndk
+rm -rf ${SOONG_OUT}
+mkdir -p ${SOONG_OUT}
+cat > ${SOONG_OUT}/soong.config << EOF
+{
+ "Ndk_abis": true
+}
+EOF
+BUILDDIR=${SOONG_OUT} ./bootstrap.bash
+${SOONG_OUT}/soong ${SOONG_OUT}/ndk.timestamp
+
+if [ -n "${DIST_DIR}" ]; then
+ mkdir -p ${DIST_DIR} || true
+ tar cjf ${DIST_DIR}/ndk_platform.tar.bz2 -C ${SOONG_OUT} ndk
+fi