When doing standalone build, check that we actually have libcxxabi before attempting to use it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
CMakeLists.txt | ||
---|---|---|
122 | This condition is hard to read. What's about if (HAVE_LIBCXXABI OR NOT LIBCXX_STANDALONE_BUILD) AND IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") Also, can you please elaborate the parts of this condition a bit? I don't follow the logic. How do HAVE_LIBCXXABI, LIBCXX_STANDALONE_BUILD and LIBCXX_LIBCXXABI_INCLUDES_INTERNAL play with each other? |
Comment Actions
We now have basically 3 modes of operations when building libc++:
- building libc++ as part of LLVM using projects/ when neither LIBCXX_STANDALONE_BUILD is nor HAVE_LIBCXXABI is defined, but we to link against libc++abi if it's available hence the IS_DIRECTORY check
- building libc++ as part of LLVM using runtimes/ when LIBCXX_STANDALONE_BUILD is set and HAVE_LIBCXXABI will be set as well if libc++abi is being built as part of runtimes/ in which case we want to link against it
- building libc++ standalone when only LIBCXX_STANDALONE_BUILD is set in which case we shouldn't be using libc++abi even if it's present (the IS_DIRECTORY is true) because it might not be built
With D28579, we'll be building libc++ for TSan as standalone, but since we aren't building libc++abi as well we shouldn't attempt to use even if it's in the tree hence the change in the condition.
This condition is hard to read. What's about
Also, can you please elaborate the parts of this condition a bit? I don't follow the logic. How do HAVE_LIBCXXABI, LIBCXX_STANDALONE_BUILD and LIBCXX_LIBCXXABI_INCLUDES_INTERNAL play with each other?