0e04342ae0
First, libc++abi doesn't need to add the no-exceptions Lit feature itself, since that is already done in the config.py for libc++, which it reuses. Specifically, config.enable_exceptions is set based on @LIBCXXABI_ENABLE_EXCEPTIONS@ in libc++abi's lit.cfg.in, and libc++'s config.py handles that correctly. Secondly, libunwind's LIBUNWIND_ENABLE_EXCEPTIONS is never set (it's probably a remnant of copy-pasting code between the runtime libraries), so the library is always built with exceptions disabled (which makes sense since it implements the runtime support for exceptions). Conversely, the test suite is always run with exceptions enabled (not sure why), but that is preserved by the default behavior of libc++'s config.py.
35 lines
1 KiB
CMake
35 lines
1 KiB
CMake
include(AddLLVM) # for add_lit_testsuite
|
|
macro(pythonize_bool var)
|
|
if (${var})
|
|
set(${var} True)
|
|
else()
|
|
set(${var} False)
|
|
endif()
|
|
endmacro()
|
|
|
|
if (NOT DEFINED LIBCXX_ENABLE_SHARED)
|
|
set(LIBCXX_ENABLE_SHARED ON)
|
|
endif()
|
|
|
|
pythonize_bool(LIBUNWIND_BUILD_32_BITS)
|
|
pythonize_bool(LIBCXX_ENABLE_SHARED)
|
|
pythonize_bool(LIBUNWIND_ENABLE_SHARED)
|
|
pythonize_bool(LIBUNWIND_ENABLE_THREADS)
|
|
pythonize_bool(LIBUNWIND_USES_ARM_EHABI)
|
|
pythonize_bool(LIBUNWIND_USE_COMPILER_RT)
|
|
pythonize_bool(LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY)
|
|
set(LIBUNWIND_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING
|
|
"TargetInfo to use when setting up test environment.")
|
|
set(LIBUNWIND_EXECUTOR "None" CACHE STRING
|
|
"Executor to use when running tests.")
|
|
|
|
set(AUTO_GEN_COMMENT "## Autogenerated by libunwind configuration.\n# Do not edit!")
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
|
@ONLY)
|
|
|
|
add_lit_testsuite(check-unwind "Running libunwind tests"
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
DEPENDS ${LIBUNWIND_TEST_DEPS}
|
|
)
|