Number of commits found: 1
Commit History - (may be incomplete: for full details, see links to repositories near top of page) |
Commit | Credits | Log message |
1.40.0 31 Jan 2025 23:02:34 |
Dimitry Andric (dim) |
lang/ldc: fix build with LLVM_DEFAULT=19
When building lang/ldc with LLVM_DEFAULT=19, linking ldc-profdata fails with:
FAILED: bin/ldc-profdata
: && /usr/local/llvm19/bin/clang++ -O2 -pipe -fPIC -fstack-protector-strong
-fno-strict-aliasing -DDMDV2 -O2 -pipe -fPIC -fstack-protector-strong
-fno-strict-aliasing -DNDEBUG -fstack-protector-strong -Xlinker
--dependency-file=tools/CMakeFiles/ldc-profdata.dir/link.d
tools/CMakeFiles/ldc-profdata.dir/ldc-profdata/llvm-profdata-19.1.cpp.o -o
bin/ldc-profdata -lLLVM-19 -L/usr/local/llvm19/lib && :
ld: error: undefined symbol: pthread_create
>>> referenced by llvm-profdata-19.1.cpp
>>>
tools/CMakeFiles/ldc-profdata.dir/ldc-profdata/llvm-profdata-19.1.cpp.o:(std::__1::future<void>
std::__1::__make_async_assoc_state[abi:sn190107]<void,
std::__1::__async_func<std::__1::function<void
()>>>(std::__1::__async_func<std::__1::function<void ()>>&&))
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
This is because the link command line is missing -lpthread. For the
tools/ subdirectory, use the CMAKE_THREAD_LIBS_INIT macro to fix the
target_link_libraries() directive.
PR: 284344
Approved by: acm (maintainer)
MFH: 2025Q1
(cherry picked from commit c580801b319fde451d9e12648519ee83a5e64231) |
Number of commits found: 1
|