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
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
diastremskii authored and MylesBorins committed Mar 28, 2017
1 parent 2f4ad6f commit 3e4ecca
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 3e4ecca

Please sign in to comment.