diff --git a/flang/lib/Decimal/CMakeLists.txt b/flang/lib/Decimal/CMakeLists.txt --- a/flang/lib/Decimal/CMakeLists.txt +++ b/flang/lib/Decimal/CMakeLists.txt @@ -42,7 +42,9 @@ append("-fno-lto" CMAKE_CXX_FLAGS) endif() - +# Disable libstdc++ assertions, even in an LLVM_ENABLE_ASSERTIONS build, to +# avoid an unwanted dependency on libstdc++.so. +add_definitions(-U_GLIBCXX_ASSERTIONS) add_flang_library(FortranDecimal INSTALL_WITH_TOOLCHAIN binary-to-decimal.cpp diff --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt --- a/flang/runtime/CMakeLists.txt +++ b/flang/runtime/CMakeLists.txt @@ -86,6 +86,10 @@ append(${NO_LTO_FLAGS} CMAKE_C_FLAGS) append(${NO_LTO_FLAGS} CMAKE_CXX_FLAGS) +# Disable libstdc++ assertions, even in an LLVM_ENABLE_ASSERTIONS build, to +# avoid an unwanted dependency on libstdc++.so. +add_definitions(-U_GLIBCXX_ASSERTIONS) + add_subdirectory(FortranMain) add_flang_library(FortranRuntime