[PATCH] D42742: [clangd] Use pthread instead of thread_local to support more runtimes.

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 6 04:22:45 PST 2018


It probably tries doing a standalone build of clang without LLVM.
clang/config.h doesn't seem to include the HAVE_PTHREAD_GETSPECIFIC used in
Context.cpp.
We can either add the corresponding macro to clang's config.h or follow
jyknight's suggestions and figure out if we can remove pthread-specific
code and fix the buildbot in a different way.



On Tue, Feb 6, 2018 at 10:59 AM Mike Lothian via Phabricator <
reviews at reviews.llvm.org> wrote:

> FireBurn added a comment.
>
> This breaks compilation for me on Gentoo's clang-9999.ebuild
>
> The following patch fixes things for me
>
>   commit a4c071b16bbbc84bbb960000d90b51bed8a12127 (HEAD -> master)
>   Author: Mike Lothian <mike at fireburn.co.uk>
>   Date:   Tue Feb 6 09:55:41 2018 +0000
>
>       [clangd] Fix include to use Clang's config.h
>
>       This fixes:
>
>       [clangd] Use pthread instead of thread_local to support more
> runtimes.
>
>   diff --git a/clangd/Context.cpp b/clangd/Context.cpp
>   index 23006778..aed832f4 100644
>   --- a/clangd/Context.cpp
>   +++ b/clangd/Context.cpp
>   @@ -8,7 +8,7 @@
>
>  //===---------------------------------------------------------------------===//
>
>    #include "Context.h"
>   -#include "llvm/Config/config.h"
>   +#include "clang/Config/config.h"
>    #include <cassert>
>
>    // The thread-local Context is scoped in a function to avoid init-order
> issues.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D42742
>
>
>
>

-- 
Regards,
Ilya Biryukov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180206/d4b29d56/attachment.html>


More information about the cfe-commits mailing list