diff --git a/build.sh b/build.sh index afa030c258fb5d556c34c95280515fdc2355e388..132866511603df058407bc9db1742fc7781b08d7 100755 --- a/build.sh +++ b/build.sh @@ -157,6 +157,11 @@ while getopts :b:d:cCehiI:j:orstvfX: optchr; do esac done +if [ $OPTIND -le $# ]; then + echo "$0: invalid option '${@:$OPTIND:1}'" + exit 1 +fi + # Make sure that all files under the build directory can be deleted; when some # LLVM tests are interrupted, they can leave behind inaccessible directories. build_cleanup() {