mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 22:20:14 +01:00
configure: Trust LLVM >= 4.0 llvm-config --libs for shared libraries
No need to manually look for the library files anymore with current LLVM. This sidesteps the manual method failing when LLVM was built with -DLLVM_APPEND_VC_REV=ON. (This might already work with older versions of LLVM) Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
165e18dd21
commit
3d8da1f678
1 changed files with 28 additions and 26 deletions
|
|
@ -2623,11 +2623,12 @@ if test "x$enable_llvm" = xyes; then
|
|||
fi
|
||||
LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
|
||||
|
||||
if test "x$enable_llvm_shared_libs" = xyes; then
|
||||
if test $LLVM_VERSION_MAJOR -lt 4; then
|
||||
dnl llvm-config may not give the right answer when llvm is a built as a
|
||||
dnl single shared library, so we must work the library name out for
|
||||
dnl ourselves.
|
||||
dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
|
||||
if test "x$enable_llvm_shared_libs" = xyes; then
|
||||
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
|
||||
LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
|
||||
AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
|
||||
|
|
@ -2653,6 +2654,7 @@ if test "x$enable_llvm" = xyes; then
|
|||
dnl install uses a shared object for each component and we have
|
||||
dnl already added all of these objects to LLVM_LIBS.
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([Building mesa with statically linked LLVM may cause compilation issues])
|
||||
dnl We need to link to llvm system libs when using static libs
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue