From 304373fb6d03531e62cf7cb1321705259a951fc1 Mon Sep 17 00:00:00 2001 From: Patrick Simmons Date: Thu, 21 Aug 2025 17:28:01 -0500 Subject: Fix Debug Build Using GCC 15 (#152223) Flang currently doesn't build in debug mode on GCC 15 due to missing dynamic libraries in some CMakeLists.txt files, and OpenMP doesn't link in debug mode due to the atomic library pulling in libstdc++ despite an incomplete attempt in the CMakeLists.txt to disable glibcxx assertions. This PR fixes these issues and allows Flang and the OpenMP runtime to build and link on GCC 15 in debug mode. --------- Co-authored-by: ronlieb --- openmp/runtime/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openmp') diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index 08e1753b9363..71eab0eedcce 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -168,7 +168,7 @@ endif() # Disable libstdc++ assertions, even in an LLVM_ENABLE_ASSERTIONS build, to # avoid an unwanted dependency on libstdc++.so. if(NOT WIN32) - add_definitions(-U_GLIBCXX_ASSERTIONS) + add_definitions(-U_GLIBCXX_ASSERTIONS -D_GLIBCXX_NO_ASSERTIONS) endif() # Add the OpenMP library -- cgit v1.2.3