Browse Source

build: don't create directory for NDK toolchain

Let make-standalone-toolchain.sh create directory.

PR-URL: https://github.com/nodejs/node/pull/11916
Backport-PR-URL: https://github.com/nodejs/node/pull/12975/
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6.x
TheBeastOfCaerbannog 8 years ago
committed by Myles Borins
parent
commit
a0973c3c1c
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 25
      android-configure

25
android-configure

@ -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

Loading…
Cancel
Save