Skip to content

Commit

Permalink
crossclang: Add support for arguments specified via file (@...)
Browse files Browse the repository at this point in the history
Xcode 15.3 organizes some common arguments into files named something
like "*-common-args.resp" and then specifies the filename as an argument
starting with a "@" character.

This currently breaks crossclang.

Add support for common arguments.
  • Loading branch information
kohlschuetter committed Mar 6, 2024
1 parent a73ce7f commit 94268c0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion junixsocket-native/crossclang/bin/clang
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,17 @@ while [ $# -gt 0 ]; do
--serialize-diagnostics ) serializeDiagnosticsOut="$v" ;;
esac

case "$v" in
case "$v" in
@* )
argFile=${v:1}
if [[ -f "$argFile" ]]; then
OLDIFS=$IFS
IFS=$'\n'
set -- $(cat -- "$argFile" | xargs -n1) $@
IFS=$OLDIFS
continue
fi
;;
-E ) needLinker=0 ;;
-fsyntax-only ) needLinker=0 ;;
-c ) needLinker=0 ;;
Expand Down

0 comments on commit 94268c0

Please sign in to comment.