As discussed on IRC this morning, when building an in-tree clang for testing we have to have libcxx and libcxxabi checked out. This is a common pitfall that manifests that is non-obvious and manifests itself only after building when running the test suite.
Details
- Reviewers
clayborg sgraenitz aprantl EricWF - Commits
- rGdeb54f1b24d7: [cmake] Make libcxx(abi) a dependency when building in-tree clang for macOS
rL349539: [cmake] Make libcxx(abi) a dependency when building in-tree clang for macOS
rLLDB349539: [cmake] Make libcxx(abi) a dependency when building in-tree clang for macOS
Diff Detail
- Repository
- rLLDB LLDB
Event Timeline
How does this affect platforms that use other ABI library than libcxxabi? How does this affect platforms that use libstdc++ as default C++ backend?
I'm not familiar with that use case myself, so I might be able to give a better answer if I understand how that works today. I think it wouldn't change anything other than that the target has to be present.
On linux libc++ is not a hard dependency for running tests (in fact, clang will not use it even if it is checked out). I guess that has something to do with the fact that libc++ is not the default c++ implementation on that platform. I think this will need to be darwin-only or something like that.
CMakeLists.txt | ||
---|---|---|
160 | What if the user wants to use a different compiler for tests? cmake has LLDB_TEST_USE_CUSTOM_C_COMPILER and LLDB_TEST_C_COMPILER and LLDB_TEST_CXX_COMPILER which can supposedly be set. |
CMakeLists.txt | ||
---|---|---|
160 | That still works. The change says that *if* you are going to build the in-tree clang, it has to build libcxx(abi) too. That should always make sense, because clang (on Darwin) won't be able to find the standard library otherwise. |
What if the user wants to use a different compiler for tests? cmake has LLDB_TEST_USE_CUSTOM_C_COMPILER and LLDB_TEST_C_COMPILER and LLDB_TEST_CXX_COMPILER which can supposedly be set.