diff options
| author | Cody P Schafer <cody@linux.vnet.ibm.com> | 2014-04-15 12:51:29 -0700 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2014-04-15 15:30:28 -0700 |
| commit | fe5eda126b9f5315e0049fd174d2326fecea6249 (patch) | |
| tree | 0422f8090d08dd1e1d2d31fc4e46a3c8ab45a42f /sparsec | |
| parent | 2ea26979e9134849c17a45aedcc80e20f27323b9 (diff) | |
| download | sparse-dev-fe5eda126b9f5315e0049fd174d2326fecea6249.tar.gz | |
sparse{i,c}: use LLVM_CONFIG to find llc and lli
Some systems have multiple llvm versions installed, and have prefixed
executables ("<exec>-<version>"). While we could require the user to
specify a variable for each executable (LLC, LLI), using llvm-config
--bindir to locate them and allowing them to override using LLVM_CONFIG
makes much less work.
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'sparsec')
| -rwxr-xr-x | sparsec | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -34,7 +34,9 @@ TMPFILE=`mktemp -t tmp.XXXXXX`".o" $DIRNAME/sparse-llvm $SPARSEOPTS > $TMPLLVM -llc -o - $TMPLLVM | as -o $TMPFILE +LLC=`"${LLVM_CONFIG:-llvm-config}" --bindir`/llc + +$LLC -o - $TMPLLVM | as -o $TMPFILE if [ $NEED_LINK -eq 1 ]; then if [ -z $OUTFILE ]; then |
