diff --git a/libcxx/cmake/caches/Generic-assertions.cmake b/libcxx/cmake/caches/Generic-assertions.cmake --- a/libcxx/cmake/caches/Generic-assertions.cmake +++ b/libcxx/cmake/caches/Generic-assertions.cmake @@ -1,3 +1,2 @@ set(LIBCXX_ENABLE_ASSERTIONS ON CACHE BOOL "") -set(LIBCXX_TEST_PARAMS "enable_assertions=True" CACHE STRING "") -set(LIBCXXABI_TEST_PARAMS "enable_assertions=True" CACHE STRING "") +set(LIBCXXABI_ENABLE_ASSERTIONS ON CACHE BOOL "") diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -104,6 +104,10 @@ serialize_lit_param(enable_debug_tests False) endif() +if (LIBCXX_ENABLE_ASSERTIONS) + serialize_lit_param(enable_assertions True) +endif() + if (CMAKE_CXX_COMPILER_TARGET) serialize_lit_param(target_triple "\"${CMAKE_CXX_COMPILER_TARGET}\"") else() diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt --- a/libcxxabi/test/CMakeLists.txt +++ b/libcxxabi/test/CMakeLists.txt @@ -79,6 +79,10 @@ serialize_lit_param(enable_exceptions False) endif() +if (LIBCXXABI_ENABLE_ASSERTIONS) + serialize_lit_param(enable_assertions True) +endif() + serialize_lit_param(enable_experimental False) if (LLVM_USE_SANITIZER)