This is an archive of the discontinued LLVM Phabricator instance.

Delete dependency on config.h
ClosedPublic

Authored by kadircet on Oct 31 2018, 8:23 AM.

Details

Summary

Since llvm/Config/config.h is not available on standalone builds,
use __USE_POSIX instead of HAVE_PTHREAD_H and get rid of the include.

Event Timeline

kadircet created this revision.Oct 31 2018, 8:23 AM

How does this play with LLVM_ENABLE_THREADS cmake option?

sammccall accepted this revision.Oct 31 2018, 8:32 AM
sammccall added inline comments.
clangd/Threading.cpp
7

nit: just ifdef?

This revision is now accepted and ready to land.Oct 31 2018, 8:32 AM
sammccall added inline comments.Oct 31 2018, 8:32 AM
clangd/Threading.cpp
104

the posix seems redundant here too

kadircet updated this revision to Diff 171931.Oct 31 2018, 8:37 AM
kadircet marked 2 inline comments as done.
  • Address comments.

How does this play with LLVM_ENABLE_THREADS cmake option?

Clangd doesn't support/respect that, and I don't think anyone's building in that configuration.
If this causes actual problems e.g. with bots, we should sort out a cmake solution so such bots don't build clangd.

This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.