diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -59,6 +59,11 @@ # Some files depend on libc++ internals. include_directories("${LIBCXXABI_LIBCXX_PATH}/src") +# Disable libstdc++/libc++ assertions, even in an LLVM_ENABLE_ASSERTIONS build, +# to avoid an unwanted dependency on libstdc++/libc++.so. +add_definitions(-U_GLIBCXX_ASSERTIONS) +add_definitions(-U_LIBCPP_ENABLE_ASSERTIONS) + if (LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL) add_definitions(-DHAVE___CXA_THREAD_ATEXIT_IMPL) endif()