extract-interface: link in clangDriver before clangBasic
authorSven Verdoolaege <sven@cerebras.net>
Fri, 5 May 2023 14:03:36 +0000 (5 16:03 +0200)
committerSven Verdoolaege <sven@cerebras.net>
Tue, 9 May 2023 21:43:11 +0000 (9 23:43 +0200)
It seems that clangBasic has always been a dependency of clangDriver,
but since LLVM commit llvmorg-15-init-16356-g3ce78cbd2392
([clang][deps] Fix handling of -MT in module command-line,
Tue Jul 12 16:55:11 2022 -0700), clangDriver started depending
on the quoteMakeTarget symbol in clangBasic, requiring clangDriver
to be linked in before clangBasic.

Reported-by: Tianjiao Sun <tianjiao.sun@cerebras.net>
Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
m4/ax_detect_clang.m4

index 58af017..50a8047 100644 (file)
@@ -271,7 +271,7 @@ if test "$have_lib_clang" = yes; then
                        [CLANG_LIBS="-lclang-cpp $CLANG_LIBS"],
              [AC_MSG_FAILURE([unable to link against libclang-cpp])])
 else
-       CLANG_LIBS="-lclangBasic -lclangDriver $CLANG_LIBS"
+       CLANG_LIBS="-lclangDriver -lclangBasic $CLANG_LIBS"
        CLANG_LIBS="-lclangAnalysis -lclangAST -lclangLex $CLANG_LIBS"
        LDFLAGS="$CLANG_LDFLAGS $CLANG_LIBS $SAVE_LDFLAGS"
        AC_CHECK_LIB([clangEdit], [main], [LIB_CLANG_EDIT=-lclangEdit], [])