[flang-commits] [flang] [llvm] [openmp] Fix Debug Build Using GCC 15 (PR #152223)

Michael Kruse via flang-commits flang-commits at lists.llvm.org
Tue Aug 26 12:56:21 PDT 2025


================
@@ -183,6 +183,10 @@ endif ()
 
 
 if (NOT WIN32)
+  add_definitions(-U_GLIBCXX_ASSERTIONS -D_GLIBCXX_NO_ASSERTIONS)
+  add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>)
+  add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-O2>)
----------------
Meinersbur wrote:

[`target_compile_options`](https://cmake.org/cmake/help/latest/command/target_compile_options.html) and [`target_compile_definitions`](https://cmake.org/cmake/help/latest/command/target_compile_definitions.html). See [AddFlangRT.cmake](https://github.com/llvm/llvm-project/blob/main/flang-rt/cmake/modules/AddFlangRT.cmake). `_GLIBCXX_ASSERTIONS` and `-fno-exceptions` are already handled there. If there are any issus with those, it should be fixed in `AddFlangRT.cmake`, not here.

https://github.com/llvm/llvm-project/pull/152223


More information about the flang-commits mailing list