This is an archive of the discontinued LLVM Phabricator instance.

[clang-tools-extra] Fix linking ClangdTests when using libclang-cpp
ClosedPublic

Authored by mgorny on Mar 20 2023, 8:04 AM.

Details

Summary

Fix linking ClangdTests to specify the dependency on the private
clangTesting library via target_link_libraries() rather than
clang_target_link_libraries(). The latter uses libclang-cpp when
CLANG_LINK_CLANG_DYLIB is used, and clangTesting is not included
in this library.

This fixes d60d3455eb2b375d026a4aa74c4ba0c38f5d323c.

Diff Detail

Event Timeline

mgorny created this revision.Mar 20 2023, 8:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 8:04 AM
mgorny requested review of this revision.Mar 20 2023, 8:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 8:04 AM
MaskRay accepted this revision.EditedMar 24 2023, 10:30 AM

(back from a long vacation with little time spending on reviews.llvm.org )

I have verified that tools/clang/tools/extra/clangd/unittests/ClangdTests does not link in -DLLVM_LINK_LLVM_DYLIB=on builds and this patch fixes it. Thanks!

This revision is now accepted and ready to land.Mar 24 2023, 10:30 AM
This revision was landed with ongoing or failed builds.Mar 24 2023, 12:25 PM
This revision was automatically updated to reflect the committed changes.

Thank you. 16.x isn't affected.