[PATCH] D91859: [clangd] Fix shared-lib builds

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 20 06:28:11 PST 2020


sammccall added a comment.

I'm not totally following the discussion on the more complete fix (LMK if you want me to dig into that), but if the build is broken in some configurations we should likely prioritize fixing that over ensuring the fix is conceptually complete.

> Otherwise by the time unittests are compiled the include paths are not set appropriately and we will see the errors with Protobuf version mismatch through transitive includes etc.

I don't think that's how CMake works, the whole CMakeLists tree is parsed before anything is compiled, so it shouldn't race like that.



================
Comment at: clang-tools-extra/clangd/index/remote/CMakeLists.txt:6
     GRPC)
+  target_link_libraries(RemoteIndexServiceProto
+    PRIVATE
----------------
oh, this is sad, because we specify the proto dependencies to generate_protos but it doesn't actually set up all the dep relationships we need (and can't because we specify the filename, not the rule).

Can you add a "FIXME: move this into generate_protos somehow"?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91859/new/

https://reviews.llvm.org/D91859



More information about the cfe-commits mailing list