3 # GCC compatible C compiler based on Sparse LLVM
13 echo "`basename $0`: no input files"
17 while [ $# -gt 0 ]; do
27 SPARSEOPTS
="$SPARSEOPTS $1 " ;;
32 TMPFILE
=`mktemp -t tmp.XXXXXX`
35 LLC
=`"${LLVM_CONFIG:-llvm-config}" --bindir`/llc
40 # cygwin uses the sjlj (setjmp-longjmp) exception model
41 LLC_ARCH_OPTS
="-exception-model=sjlj"
42 LLC_ARCH_OPTS
="$LLC_ARCH_OPTS -mtriple=$(llvm-config --host-target)"
48 $DIRNAME/sparse-llvm
$SPARSEOPTS |
$LLC ${LLC_ARCH_OPTS} | as
-o $TMPFILE
50 if [ $NEED_LINK -eq 1 ]; then
51 if [ -z $OUTFILE ]; then
54 gcc
$TMPFILE -o $OUTFILE
57 if [ -z $OUTFILE ]; then
58 echo "`basename $0`: no output file"