<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95347>95347</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Enabling libcxx runtimes breaks running clang unit tests on MacOS
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++,
build-problem
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mizvekov
</td>
</tr>
</table>
<pre>
My clang development setup works fine without libcxx. However, when I enable it:
```json
"LLVM_ENABLE_RUNTIMES": "libcxx;compiler-rt;libcxxabi;libunwind"
```
I start getting a bunch of errors when building the `check-clang` target:
```
[439/440] Running the Clang regression tests
llvm-lit: /Users/mizvekov/Repos/llvm/1/llvm/utils/lit/lit/llvm/config.py:508: note: using clang: /Users/mizvekov/Repos/llvm/1/build/rwd/llvm/bin/clang
llvm-lit: /Users/mizvekov/Repos/llvm/1/llvm/utils/lit/lit/util.py:473: note: using SDKROOT: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk'
dyld[51373]: weak-def symbol not found '__ZnwmSt19__type_descriptor_t'weak-def symbol not found '__ZnamSt19__type_descriptor_t'
```
And so on.
Full list of broken tests:
```
Failed Tests (28):
Clang-Unit :: AST/./ASTTests/failed_to_discover_tests_from_gtest
Clang-Unit :: AST/Interp/./InterpTests/failed_to_discover_tests_from_gtest
Clang-Unit :: ASTMatchers/./ASTMatchersTests/failed_to_discover_tests_from_gtest
Clang-Unit :: ASTMatchers/Dynamic/./DynamicASTMatchersTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Analysis/./ClangAnalysisTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Analysis/FlowSensitive/./ClangAnalysisFlowSensitiveTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Basic/./BasicTests/failed_to_discover_tests_from_gtest
Clang-Unit :: CodeGen/./ClangCodeGenTests/failed_to_discover_tests_from_gtest
Clang-Unit :: CrossTU/./CrossTUTests/failed_to_discover_tests_from_gtest
Clang-Unit :: DirectoryWatcher/./DirectoryWatcherTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Driver/./ClangDriverTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Format/./FormatTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Frontend/./FrontendTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Index/./IndexTests/failed_to_discover_tests_from_gtest
Clang-Unit :: InstallAPI/./InstallAPITests/failed_to_discover_tests_from_gtest
Clang-Unit :: Interpreter/./ClangReplInterpreterTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Interpreter/ExceptionTests/./ClangReplInterpreterExceptionTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Lex/./LexTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Rename/./ClangRenameTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Rewrite/./RewriteTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Sema/./SemaTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Serialization/./SerializationTests/failed_to_discover_tests_from_gtest
Clang-Unit :: StaticAnalyzer/./StaticAnalysisTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Support/./ClangSupportTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Tooling/./ToolingTests/failed_to_discover_tests_from_gtest
Clang-Unit :: Tooling/Syntax/./SyntaxTests/failed_to_discover_tests_from_gtest
Clang-Unit :: libclang/./libclangTests/failed_to_discover_tests_from_gtest
Clang-Unit :: libclang/CrashTests/./libclangCrashTests/failed_to_discover_tests_from_gtest
```
Everything else works fine, and I can build the `check-cxx` target successfully.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0V0uP4jgX_TVmY1UUHMJjwQKKyvehrupuATXTmk3kJBdw49iR7fDoXz-ykwDVz2mNR0LB99g-x9e-eRyqNdsJgCmK5yhe9Ght9lJNS_blCAd57GWyuExfLjjnVOxwAUfgs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