[PATCH] D71548: Fix time trace multi threaded support with LLVM_ENABLE_THREADS=OFF
Arthur O'Dwyer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 23 05:08:08 PST 2019
Quuxplusone added inline comments.
================
Comment at: llvm/include/llvm/Support/TimeProfiler.h:19
+#define THREAD_LOCAL_IF_THREADS_ENABLED
+#endif
+
----------------
This patch still doesn't unbreak the build on Mac OSX:
```
/llvm-project/llvm/include/llvm/Support/TimeProfiler.h:24:8: error: thread-local storage is not supported for the current target
extern THREAD_LOCAL_IF_THREADS_ENABLED std::unique_ptr<TimeTraceProfiler>
^
```
Personally, I'd like to see the original patch reverted until you can find a way to do it without `thread_local`. ...And it seems like you //do// have a way? If the code works without using `thread_local` at all, then what's the logic behind adding `thread_local` to it conditionally? Given that the version without `thread_local` works fine, can we just use that version on all platforms?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71548/new/
https://reviews.llvm.org/D71548
More information about the llvm-commits
mailing list