Clarify COMPILER_PLUGINS_CXX_LINKFLAGS vs. COMPILER_PLUGINS_LINKFLAGS
COMPILER_PLUGINS_CXX_LINKFLAGS was introduced with39e7a72b3e
"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.ad5cbcf6ba
"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@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -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(); ]])
|
||||
|
Reference in New Issue
Block a user