From e9e2ef7d530df7df62cd0696fe87f75a013c291e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 13 Sep 2024 13:32:24 +0300 Subject: [PATCH] wrappers: Unify handling of CMD_EXE in clang-scan-deps-wrapper.sh If we never set $TARGET, we'd previously miss including $CMD_EXE in the nested command. (This doesn't happen in actual uses of the wrapper though, but is included for completeness.) This matches how the corresponding variable is handled in the C version of the wrapper. --- wrappers/clang-scan-deps-wrapper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrappers/clang-scan-deps-wrapper.sh b/wrappers/clang-scan-deps-wrapper.sh index 614e872..5858a23 100755 --- a/wrappers/clang-scan-deps-wrapper.sh +++ b/wrappers/clang-scan-deps-wrapper.sh @@ -32,6 +32,7 @@ FLAGS=() while [ $# -gt 0 ]; do if [ -n "$got_flags" ]; then CMD_EXE="$1" + FLAGS+=("$1") shift break elif [ "$1" = "--" ]; then @@ -60,7 +61,7 @@ if [ -n "$CMD_EXE" ]; then fi if [ -n "$TARGET" ]; then - "$EXE" "${FLAGS[@]}" "$CMD_EXE" -target $TARGET -stdlib=libc++ "$@" + "$EXE" "${FLAGS[@]}" -target $TARGET -stdlib=libc++ "$@" else "$EXE" "${FLAGS[@]}" "$@" fi