[Openmp-commits] [flang] [llvm] [openmp] Fix Debug Build Using GCC 15 (PR #152223)
Michael Kruse via Openmp-commits
openmp-commits at lists.llvm.org
Fri Aug 22 11:28:57 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:
1. `-U_GLIBCXX_ASSERTIONS` and `fno-exceptions` are already added in AddFlangRT.cmake. `_GLIBCXX_NO_ASSERTIONS` should not be necessary, but could be an alternative to `-U_GLIBCXX_ASSERTIONS`
2. We prefer [modern CMake](https://hsf-training.github.io/hsf-training-cmake-webpage/04-targets/index.html) style
3. Adding `-O2` overrides the choice of `CMAKE_BUILD_TYPE`. What optimization level to use should be left to the user.
https://github.com/llvm/llvm-project/pull/152223
More information about the Openmp-commits
mailing list