When libunwind and libc++abi is build in the runtimes layout,
we set <PROJECT>_STANDALONE_BUILD but at the same time the condition
CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR isn't true since
we're building in llvm/runtimes. Handle this case in the CMake build
to avoid disabling tests.
Details
Diff Detail
Event Timeline
@phosek and I discussed this on IRC, and I'm summarizing our discussion here. We're not sure if it actually makes sense for the runtimes build to set the *_STANDALONE_BUILD variables, and he was gonna play with that.
libcxxabi/CMakeLists.txt | ||
---|---|---|
484 | This seems pretty subtle. The condition seems to care about whether we're building libc++ alongside libc++abi; perhaps adding AND NOT HAVE_LIBCXX to the condition would be enough? | |
libunwind/CMakeLists.txt | ||
366 | This feels a little strange because the test would suggest that LLVM_CMAKE_PATH is important for the test subdirectory, but apparently things work fine without it. Is there any other condition that could work here? |
This seems pretty subtle. The condition seems to care about whether we're building libc++ alongside libc++abi; perhaps adding AND NOT HAVE_LIBCXX to the condition would be enough?