2 ##===- tools/gccas.sh ------------------------------------------*- bash -*-===##
4 # The LLVM Compiler Infrastructure
6 # This file was developed by Reid Spencer and is distributed under the
7 # University of Illinois Open Source License. See LICENSE.TXT for details.
9 ##===----------------------------------------------------------------------===##
11 # Synopsis: This shell script is a replacement for the old "gccas" tool that
12 # existed in LLVM versions before 2.0. The functionality of gccas has
13 # now been moved to opt and llvm-as. This shell script provides
14 # backwards compatibility so build environments invoking gccas can
15 # still get the net effect of llvm-as/opt by running gccas.
17 # Syntax: gccas OPTIONS... [asm file]
19 ##===----------------------------------------------------------------------===##
22 OPTOPTS="-std-compile-opts -f"
25 for option in "$@" ; do
28 OPTOPTS="$OPTOPTS $option"
31 OPTOPTS="$OPTOPTS $option"
34 OPTOPTS="$OPTOPTS -verify-each"
37 OPTOPTS="$OPTOPTS $option"
50 echo "gccas: Unrecognized option '$option'"
54 if test $lastwasdasho -eq 1 ; then
55 OPTOPTS="$OPTOPTS $option"
58 ASOPTS="$ASOPTS $option"
63 ${TOOLDIR}/llvm-as $ASOPTS -o - | ${TOOLDIR}/opt $OPTOPTS