Author: lebedevri
Date: Fri Feb  1 00:23:23 2019
New Revision: 352841

URL: http://llvm.org/viewvc/llvm-project?rev=352841&view=rev
Log:
[clangd] Fix -DBUILD_SHARED_LIBS=ON build - SwapIfBranches needs clangAST.

Else, fails with:

[1/2] Linking CXX executable bin/clangd
FAILED: bin/clangd
: && /usr/bin/g++  -pipe -O2 -g0 -UNDEBUG -fPIC -fvisibility-inlines-hidden 
-Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter 
-Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic 
-Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized 
-Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment 
-fdiagnostics-color -ffunction-sections -fdata-sections -fno-common 
-Woverloaded-virtual -fno-strict-aliasing -pipe -O2 -g0 -UNDEBUG  -fuse-ld=lld 
-Wl,--color-diagnostics -Wl,-allow-shlib-undefined     -Wl,-O3 
-Wl,--gc-sections 
tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapIfBranches.cpp.o
 tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o  -o 
bin/clangd  -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMSupport.so.9svn -lpthread 
lib/libclangBasic.so.9svn lib/libclangTidy.so.9svn lib/libclangDaemon.so.9svn 
lib/libclangFormat.so.9svn lib/libclangFrontend.so.9svn 
lib/libclangSema.so.9svn lib/libclangTooling.so.9svn 
lib/libclangToolingCore.so.9svn && :
ld.lld: error: undefined symbol: 
clang::FunctionDecl::getBody(clang::FunctionDecl const*&) const
>>> referenced by SwapIfBranches.cpp
>>>               
>>> tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapIfBranches.cpp.o:(clang::FunctionDecl::getBody()
>>>  const)

and so on.

Modified:
    clang-tools-extra/trunk/clangd/tool/CMakeLists.txt

Modified: clang-tools-extra/trunk/clangd/tool/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/tool/CMakeLists.txt?rev=352841&r1=352840&r2=352841&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/tool/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clangd/tool/CMakeLists.txt Fri Feb  1 00:23:23 2019
@@ -17,6 +17,7 @@ endif()
 
 target_link_libraries(clangd
   PRIVATE
+  clangAST
   clangBasic
   clangTidy
   clangDaemon


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to