configure.ac: link against same LLVM components as libclang.so
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Sep 2012 13:33:31 +0000 (15:33 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Sep 2012 13:37:44 +0000 (15:37 +0200)
Since 74e0407 (configure.ac: only link against libraries from LLVM
analysis component, Wed Jan 18 16:47:38 2012 +0100), we only link
against some components of LLVM, but the choice of which components
to include was made fairly arbitrarily.
This appeared to work, but fails do so on more recent versions of clang.
Instead, we now link against the same LLVM components as libclang.so.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
configure.ac

index 10aa00c..59f0c91 100644 (file)
@@ -125,7 +125,8 @@ system)
        fi
        CLANG_CXXFLAGS=`$llvm_config --cxxflags`
        CLANG_LDFLAGS=`$llvm_config --ldflags`
-       CLANG_LIBS=`$llvm_config --libs analysis`
+       targets=`$llvm_config --targets-built`
+       CLANG_LIBS=`$llvm_config --libs $targets asmparser support mc`
        CLANG_PREFIX=`$llvm_config --prefix`
        AC_DEFINE_UNQUOTED(CLANG_PREFIX, ["$CLANG_PREFIX"],
                                [Clang installation prefix])