[Lldb-commits] [PATCH] D30844: pthread_setname_np first appeared in glibc 2.12
Jonathan Roelofs via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 13 07:43:03 PDT 2017
jroelofs added a comment.
> If you want to get your build working, I suggest you just remove the setting code.
@labath I have my local build working, but I don't want to carry local patches if possible. How about the original patch, which adds the glibc 2.12 check:
void HostThreadLinux::SetName(lldb::thread_t thread, llvm::StringRef name) {
-#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
+#if (((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
+ defined(_GNU_SOURCE)) || defined(__ANDROID__)
::pthread_setname_np(thread, name.data());
#else
(void)thread;
It's no worse than what was already there, makes forward progress in supporting this particular host platform, and avoids a bunch more yak shaving.
https://reviews.llvm.org/D30844
More information about the lldb-commits
mailing list