From f44267730a7d7c327cf5e961b492eca37f44a3d3 Mon Sep 17 00:00:00 2001 From: liyunfei Date: Wed, 9 Apr 2025 14:55:24 +0800 Subject: [PATCH] Add handling for extra command-line options for build.sh Add additional logic for handling options like this: build.sh -i install -c -r ..etc which will be accept by build.sh before. --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index afa030c258fb..132866511603 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() { -- Gitee