[clang-tools-extra] r325458 - [clangd] Fix link failures for Preprocessor::addCommentHandler

Heejin Ahn via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 18 02:50:16 PST 2018


Author: aheejin
Date: Sun Feb 18 02:50:16 2018
New Revision: 325458

URL: http://llvm.org/viewvc/llvm-project?rev=325458&view=rev
Log:
[clangd] Fix link failures for Preprocessor::addCommentHandler

Summary:
D42640 adds calls to `Preprocessor::addCommentHandler` in
`unittests/clangd/SymbolCollectorTests.cpp` and
`clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp` but does not
link `clangLex` library. This causes undefined reference errors when
built with `-DBUILD_SHARED_LIBS=ON`.

Reviewers: ioeric

Subscribers: klimek, mgorny, ilya-biryukov, jkorous-apple, cfe-commits

Differential Revision: https://reviews.llvm.org/D43437

Modified:
    clang-tools-extra/trunk/clangd/global-symbol-builder/CMakeLists.txt
    clang-tools-extra/trunk/unittests/clangd/CMakeLists.txt

Modified: clang-tools-extra/trunk/clangd/global-symbol-builder/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/global-symbol-builder/CMakeLists.txt?rev=325458&r1=325457&r2=325458&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/global-symbol-builder/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clangd/global-symbol-builder/CMakeLists.txt Sun Feb 18 02:50:16 2018
@@ -15,5 +15,6 @@ target_link_libraries(global-symbol-buil
   clangDaemon
   clangBasic
   clangFrontend
+  clangLex
   clangTooling
 )

Modified: clang-tools-extra/trunk/unittests/clangd/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/CMakeLists.txt?rev=325458&r1=325457&r2=325458&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/unittests/clangd/CMakeLists.txt Sun Feb 18 02:50:16 2018
@@ -38,6 +38,7 @@ target_link_libraries(ClangdTests
   clangFormat
   clangFrontend
   clangIndex
+  clangLex
   clangSema
   clangTooling
   clangToolingCore




More information about the cfe-commits mailing list