Bug 1112974 - Try to find llvm-config through clang first before looking at $PATH; r=glandium

Right now, if the LLVMCONFIG variable is not set in the .mozconfig, we
first look for the system default llvm-config and only then we ask clang
itself, which breaks building with the clang plugin if you make $CC and
$CXX point to a non-default clang binary.  This patch fixes the issue
by reversing the search order.

--HG--
extra : rebase_source : 23ab716f4e220097e4c31092475dba769f4e7dfc
This commit is contained in:
Ehsan Akhgari 2014-12-19 13:13:44 -05:00
parent ed9800814c
commit 9c078e03a4

View File

@ -15,11 +15,11 @@ if test -n "$ENABLE_CLANG_PLUGIN"; then
AC_MSG_CHECKING([for llvm-config])
if test -z "$LLVMCONFIG"; then
LLVMCONFIG=`which llvm-config`
LLVMCONFIG=`$CXX -print-prog-name=llvm-config`
fi
if test -z "$LLVMCONFIG"; then
LLVMCONFIG=`$CXX -print-prog-name=llvm-config`
LLVMCONFIG=`which llvm-config`
fi
if test ! -x "$LLVMCONFIG"; then