Skip to content

Commit

Permalink
build: don't create directory for NDK toolchain
Browse files Browse the repository at this point in the history
Let make-standalone-toolchain.sh create directory.

PR-URL: #11916
Backport-PR-URL: #12975
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
diastremskii authored and MylesBorins committed May 18, 2017
1 parent e3352bb commit a0973c3
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions android-configure
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,26 @@ case $ARCH in
;;
esac

NDK_PATH=$1
function make_toolchain {
$NDK_PATH/build/tools/make-standalone-toolchain.sh \
--toolchain=$TOOLCHAIN_NAME-$CC_VER \
--arch=$ARCH \
--install-dir=$TOOLCHAIN \
--platform=android-21
}

export TOOLCHAIN=$PWD/android-toolchain
mkdir -p $TOOLCHAIN
$1/build/tools/make-standalone-toolchain.sh \
--toolchain=$TOOLCHAIN_NAME-$CC_VER \
--arch=$ARCH \
--install-dir=$TOOLCHAIN \
--platform=android-21
if [ -d "$TOOLCHAIN" ]; then
read -r -p "NDK toolchain already exists. Replace it? [y/N]" response
case "$response" in
[Yy])
rm -rf "$TOOLCHAIN"
make_toolchain
esac
else
make_toolchain
fi
export PATH=$TOOLCHAIN/bin:$PATH
export AR=$TOOLCHAIN/bin/$SUFFIX-ar
export CC=$TOOLCHAIN/bin/$SUFFIX-gcc
Expand Down

0 comments on commit a0973c3

Please sign in to comment.