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 16, 2017
1 parent bbd7b77 commit b179b26
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 b179b26

Please sign in to comment.