[PATCH] D71059: [LLD][ELF] Add time-trace to ELF LLD (1/2)
Russell Gallop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 07:01:54 PST 2019
russell.gallop added a comment.
In D71059#1785750 <https://reviews.llvm.org/D71059#1785750>, @Quuxplusone wrote:
> This patch breaks the build on Apple Clang (Mac OSX 10.13.6).
>
> $ ninja clang
> [27/2870] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TimeProfiler.cpp.o
> FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/TimeProfiler.cpp.o
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -I/llvm-project/llvm/lib/Support -I/usr/include/libxml2 -Iinclude -I/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -O2 -g -DNDEBUG -std=c++14 -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/TimeProfiler.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/TimeProfiler.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/TimeProfiler.cpp.o -c /llvm-project/llvm/lib/Support/TimeProfiler.cpp
> In file included from /llvm-project/llvm/lib/Support/TimeProfiler.cpp:13:
> /llvm-project/llvm/include/llvm/Support/TimeProfiler.h:17:8: error: thread-local storage is not supported for the current target
> extern thread_local std::unique_ptr<TimeTraceProfiler>
> ^
> /llvm-project/llvm/lib/Support/TimeProfiler.cpp:36:1: error: thread-local storage is not supported for the current target
> thread_local std::unique_ptr<TimeTraceProfiler> TimeTraceProfilerInstance =
> ^
> 2 errors generated.
>
>
> I guess this is related to the `LLVM_ENABLE_THREADS` issue mentioned above.
I've put a fix up here: https://reviews.llvm.org/D71548 that I think should work. I don't have a system where it fails to build with LLVM_ENABLE_THREADS=OFF.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71059/new/
https://reviews.llvm.org/D71059
More information about the llvm-commits
mailing list