This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Don't build clangd or run its tests when LLVM_ENABLE_THREADS is off, unless specifically directed to do so
AbandonedPublic

Authored by sammccall on Apr 25 2019, 3:06 AM.

Details

Summary

Introduce a new CLANGD_BUILD option, only default to true if threads are on.

(the name doesn't seem ideal, I'm trying to follow precedent of CLANGD_BUILD_XPC)

This is a bit of a mess because of the parallel unittest/ and test/ trees in
clang-tools-extra (clangd has three root directories).

I'd like to move clang-tools-extra/test/clangd -> clang-tools-extra/clangd/test etc,
but will do that afterwards.

Event Timeline

sammccall created this revision.Apr 25 2019, 3:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2019, 3:06 AM
ilya-biryukov accepted this revision.Apr 25 2019, 3:16 AM

A better name could definitely be nice, e.g. BUILD_CLANGD would've been much nicer.
But the current one is also okayish, being consistent with existing names is a good reason to keep it that way.

CMakeLists.txt
13

NIT: maybe comment why we disable clangd with no threads?
Merely mentioning this configuration is not supported in clangd would be good enough.

Maybe it's just me, but I tend to find following cmake scripts really hard and even obvious comments make it much simpler.

This revision is now accepted and ready to land.Apr 25 2019, 3:16 AM
sammccall abandoned this revision.May 7 2019, 12:08 AM

Superseded by rL360115