[clangd] Don't try pthread, just use thread_local. Reverts r323949.
authorSam McCall <sam.mccall@gmail.com>
Tue, 6 Feb 2018 14:25:02 +0000 (14:25 +0000)
committerSam McCall <sam.mccall@gmail.com>
Tue, 6 Feb 2018 14:25:02 +0000 (14:25 +0000)
commit3aecc7fd451c69b2aec829b0ad70c28772c348c3
tree7775f12d2abfc15f87a1e5c9961028f893cc0565
parent88f11003a091219b01f234bf9f1cea11c40f808d
[clangd] Don't try pthread, just use thread_local. Reverts r323949.

The pthread solution here breaks standalone builds, which don't have the
relevant cmake magic for feature-detection.

The original reason for trying pthread was fear of libgcc without
support for thread_local (e.g. on the clang-x86_64-linux-selfhost-modules bot).
However the earliest supported GCC is 4.8, and this has __cxa_thread_atexit.

This will probably break that bot, it's not running a supported GCC and needs
to be upgraded. I'll try to find out how to do this.

llvm-svn: 324351
clang-tools-extra/clangd/Context.cpp