[Libreoffice-commits] core.git: configure.ac

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 8 21:50:39 UTC 2019


 configure.ac |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c262e9f94bfbd82f2020fa493c474ed9cffc3b04
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Oct 8 16:16:38 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Oct 8 23:49:20 2019 +0200

    Clarify COMPILER_PLUGINS_CXX_LINKFLAGS vs. COMPILER_PLUGINS_LINKFLAGS
    
    COMPILER_PLUGINS_CXX_LINKFLAGS was introduced with
    39e7a72b3e328e6b3d87479d693b01315610457b "Support loplugin in clang-cl" to
    augment COMPILER_PLUGINS_CXX.  Due to MSVC cl.exe command-line processing,
    certain linker-related arguments must come at the very end of the command line,
    so cannot be included in COMPILER_PLUGINS_CXX.  COMPILER_PLUGINS_CXX_LINKFLAGS
    is specified in autogen.input (along with COMPILER_PLUGINS_CXX) and configure.ac
    merely passes it on to its use in compilerplugins/Makefile-clang.mk.
    
    ad5cbcf6ba0afdc1d8d7405c2641cce8de4a360b "try to autodetect flags needed to
    build Clang plugins" now needs a configure.ac-internal variable to store the
    output of `llvm-config --ldflags ...`, similarly to how
    COMPILER_PLUGINS_CXXFLAGS stores the output of `llvm-config --cxxflags`.  It
    reused COMPILER_PLUGINS_CXX_LINKFLAGS for that, but that makes it hard for my
    clang-cl build to pass my specification of COMPILER_PLUGINS_CXX_LINKFLAGS from
    autogen.input to its use in compilerplugins/Makefile-clang.mk.  So rename this
    new variable to COMPILER_PLUGINS_LINKFLAGS (matching COMPILER_PLUGINS_CXXFLAGS).
    
    Change-Id: I93b0b50ba94803041773757d9978222e2726f9b0
    Reviewed-on: https://gerrit.libreoffice.org/80473
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 5bb1a2029817..e387e4429f0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7014,7 +7014,7 @@ if test "$COM_IS_CLANG" = "TRUE"; then
         AC_PATH_PROG(LLVM_CONFIG, llvm-config,[],$CLANGDIR/bin $PATH)
         if test -n "$LLVM_CONFIG"; then
             COMPILER_PLUGINS_CXXFLAGS=$($LLVM_CONFIG --cxxflags)
-            COMPILER_PLUGINS_CXX_LINKFLAGS=$($LLVM_CONFIG --ldflags --libs --system-libs | tr '\n' ' ')
+            COMPILER_PLUGINS_LINKFLAGS=$($LLVM_CONFIG --ldflags --libs --system-libs | tr '\n' ' ')
             if test -z "$CLANGLIBDIR"; then
                 CLANGLIBDIR=$($LLVM_CONFIG --libdir)
             fi
@@ -7046,14 +7046,14 @@ if test "$COM_IS_CLANG" = "TRUE"; then
             AC_MSG_CHECKING([for clang libraries to use])
             if test -z "$CLANGTOOLLIBS"; then
                 LIBS="-lclangTooling -lclangDriver -lclangFrontend -lclangParse -lclangSema -lclangEdit \
- -lclangAnalysis -lclangAST -lclangLex -lclangSerialization -lclangBasic $COMPILER_PLUGINS_CXX_LINKFLAGS"
+ -lclangAnalysis -lclangAST -lclangLex -lclangSerialization -lclangBasic $COMPILER_PLUGINS_LINKFLAGS"
                 AC_LINK_IFELSE([
                     AC_LANG_PROGRAM([[#include "clang/Basic/SourceLocation.h"]],
                         [[ clang::FullSourceLoc().dump(); ]])
                 ],[CLANGTOOLLIBS="$LIBS"],[])
             fi
             if test -z "$CLANGTOOLLIBS"; then
-                LIBS="-lclang-cpp $COMPILER_PLUGINS_CXX_LINKFLAGS"
+                LIBS="-lclang-cpp $COMPILER_PLUGINS_LINKFLAGS"
                 AC_LINK_IFELSE([
                     AC_LANG_PROGRAM([[#include "clang/Basic/SourceLocation.h"]],
                         [[ clang::FullSourceLoc().dump(); ]])


More information about the Libreoffice-commits mailing list