<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60467>60467</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Compiling libc with SCUDO using gcc fails
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
liam-clink
</td>
</tr>
</table>
<pre>
cmake invocation:
```
cmake -S ../llvm/ -B . -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS="clang;libc;lld;compiler-rt" -DLLVM_ENABLE_RUNTIMES="" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLIBCXX_USE_COMPILER_RT=YES -DLIBCXXABI_USE_COMPILER_RT=YES -DLLVM_USE_LINKER=lld -DLIBCXXABI_USE_LLVM_UNWINDER=YES -DLLVM_INSTALL_UTILS=On -DLLVM_LIBC_FULL_BUILD=ON -DLLVM_LIBC_INCLUDE_SCUDO=ON -DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON -DCOMPILER_RT_BUILD_GWP_ASAN=OFF -DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF -DCMAKE_INSTALL_PREFIX=$HOME/llvm15_temp
```
```
[1/881] Linking CXX executable bin/libc-scudo-integration-test
FAILED: bin/libc-scudo-integration-test
: && /home/liam/gcc-12.2.0/bin/g++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics -pthreads projects/libc/test/integration/scudo/CMakeFiles/libc-scudo-integration-test.dir/integration_test.cpp.o -o bin/libc-scudo-integration-test projects/libc/test/integration/scudo/liblibc_for_scudo_integration_test.a && cd /home/liam/Documents/GitHub/llvm-project/build/projects/libc/test/integration/scudo && /home/liam/Documents/GitHub/llvm-project/build/bin/libc-scudo-integration-test
g++: error: unrecognized command-line option '-pthreads'; did you mean '-pthread'?
[2/881] Linking CXX executable bin/libc-gwp-asan-uaf-should-crash
FAILED: bin/libc-gwp-asan-uaf-should-crash
: && /home/liam/gcc-12.2.0/bin/g++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics -pthreads projects/libc/test/integration/scudo/CMakeFiles/libc-gwp-asan-uaf-should-crash.dir/gwp_asan_should_crash.cpp.o -o bin/libc-gwp-asan-uaf-should-crash projects/libc/test/integration/scudo/liblibc_for_scudo_integration_test.a && :
g++: error: unrecognized command-line option '-pthreads'; did you mean '-pthread'?
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsV19P4z4W_TTui-UqdZoCD31ImwS6v9Ci_tnye4pc20k9OHbWdmCYT79yUgozDLPDw6600kiIqj73nnsdn3saE2tFpTifgmgGomRAWnfUZioFqRGVQj0MDpo9T2lNHjgU6lFT4oRWIIxBkIAgBpPg9Nd97ePQBg6HAGdSPtYAZxDN4BCia7gU6guBKJnfx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