Skip to content

Instantly share code, notes, and snippets.

@ancapdev
Forked from xianyi/as
Created December 20, 2013 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ancapdev/8059572 to your computer and use it in GitHub Desktop.
Save ancapdev/8059572 to your computer and use it in GitHub Desktop.
#!/bin/sh
HAS_INPUT_FILE=0
ARGS=$@
while [ $# -ne 0 ]; do
ARG=$1
# Skip options
if [ $ARG == "-arch" ] || [ $ARG == "-o" ]; then
# Skip next token
shift
shift
continue
fi
if [ `echo $ARG | head -c1` == "-" ]; then
shift
continue
fi
HAS_INPUT_FILE=1
break
done
if [ $HAS_INPUT_FILE -eq 1 ]; then
clang -Qunused-arguments -c -x assembler $ARGS
else
clang -Qunused-arguments -c -x assembler $ARGS -
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment