diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-10-29 14:51:50 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-10-29 14:56:24 -0700 |
commit | f65756e3ae71dd511f4df671cb5582253d580828 (patch) | |
tree | 7f48c31d74056a3af936699611d373ef7db31ba5 /build | |
parent | a7ce936b1cad319c9aefdfd7d058f8e54663e9d9 (diff) | |
download | ndk-f65756e3ae71dd511f4df671cb5582253d580828.tar.gz |
Don't default to ARCH=arm in make-standalone-toolchain.sh
Previously make-standalone-toolchain.sh default to "--arch arm" if one
of the conditions is met
1. --arch XYZ where XYZ isn't known supported arch
2. --toolchain=XYZ points to unknown toolchain
Fixed to abort with supported archs printed, instead of assuming it's arm.
Otherwise easy mistake like "--arch aarch64 --toolchain=aarch64-linux-android-4.9"
may copy arm's headers/libs and create a broken arm64 standalone toolchain
See b.android.com/74377
Change-Id: Ieeddd5696884703a6df3714a3ff54590be80d30f
Diffstat (limited to 'build')
-rwxr-xr-x | build/tools/make-standalone-toolchain.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/build/tools/make-standalone-toolchain.sh b/build/tools/make-standalone-toolchain.sh index a38a20764..02b0e60bd 100755 --- a/build/tools/make-standalone-toolchain.sh +++ b/build/tools/make-standalone-toolchain.sh @@ -105,7 +105,9 @@ if [ -z "$ARCH" ]; then ARCH=mips64 ;; *) - ARCH=arm + ARCH=null + echo "Unable to auto-config arch from toolchain $TOOLCHAIN_NAME" + exit 1 ;; esac ARCH_INC=$ARCH @@ -132,7 +134,10 @@ else ARCH=mips64 ;; *) - ARCH=arm + echo "Invalid --arch $ARCH" + echo "Please use one of arm, x86, mips, arm64, x86_64 or mips64" + ARCH=null + exit 1 ;; esac |