This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Move non-clang base pieces into separate support/ lib.
ClosedPublic

Authored by sammccall on Apr 28 2020, 8:51 AM.

Details

Summary

This enforces layering, reduces a sprawling clangd/ directory, and makes life
easier for embedders.

Diff Detail

Event Timeline

sammccall created this revision.Apr 28 2020, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2020, 8:51 AM

Of the pieces I was unsure about:

  • I didn't move Protocol - it's not a perfect fit, though it may still end up here
  • I moved FSProvider but not FS
  • I didn't move URI - I suspect that will *probably* end up wherever Protocol does, though it may belong in support even if protocol doesn't.
sammccall updated this revision to Diff 260665.Apr 28 2020, 9:22 AM

Avoid dep on clang header for thread stack size.

kbobyrev accepted this revision.Apr 29 2020, 6:17 AM

LGTM, thanks!

This revision is now accepted and ready to land.Apr 29 2020, 6:17 AM
sammccall updated this revision to Diff 260905.Apr 29 2020, 6:59 AM

Update CMakeLists for non-default configurations, optimistically.

This revision was automatically updated to reflect the committed changes.
jsji added a subscriber: jsji.EditedApr 29 2020, 11:59 AM

Looks like this is causing buildbot failure when built with -DBUILD_SHARED_LIBS=ON.
http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/3077/steps/build%20stage%201/logs/stdio

FAILED: lib/libclangDaemon.so.11git 
: && /home/buildbots/clang.9.0.0/bin/clang++ -... && :
tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CodeComplete.cpp.o:(.toc+0x120): undefined reference to `pthread_create'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Looks like this is causing buildbot failure when built with -DBUILD_SHARED_LIBS=ON.
http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/3077/steps/build%20stage%201/logs/stdio

FAILED: lib/libclangDaemon.so.11git 
: && /home/buildbots/clang.9.0.0/bin/clang++ -... && :
tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CodeComplete.cpp.o:(.toc+0x120): undefined reference to `pthread_create'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks, bc029fa6c5cdc28fa2087f721e5ffe27d9b24ecd should fix this.
Will keep an eye on it (didn't get mail last time, maybe it was already broken).

Looks like this is causing buildbot failure when built with -DBUILD_SHARED_LIBS=ON.
http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/3077/steps/build%20stage%201/logs/stdio

FAILED: lib/libclangDaemon.so.11git 
: && /home/buildbots/clang.9.0.0/bin/clang++ -... && :
tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CodeComplete.cpp.o:(.toc+0x120): undefined reference to `pthread_create'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks! Fixed in https://github.com/llvm/llvm-project/commit/bc029fa6c5cdc28fa2087f721e5ffe27d9b24ecd

Ah, sorry, stale tab :(

I think there's more, just running a local shared build so I can catch them (I should really have done this ahead of time).

I think there's more, just running a local shared build so I can catch them (I should really have done this ahead of time).

OK, this now builds for me in shared mode after e7a7deb60ab0ee4ccd9e1f0de8e164b615344ae2

jsji added a comment.Apr 29 2020, 3:11 PM

Thanks all, yes, it is passing now.

I think there's more, just running a local shared build so I can catch them (I should really have done this ahead of time).

Ah, I've done that (since I primarily build in the shared mode, though I temporarily switched to static to resolve recent shared index issues) but didn't only built some of the targets, should've done all of them; my bad too, sorry.