[Openmp-commits] [openmp] [OpenMP] Fix libomp debug build. (PR #81029)

via Openmp-commits openmp-commits at lists.llvm.org
Wed Feb 7 11:33:16 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-openmp

Author: Daniil Fukalov (dfukalov)

<details>
<summary>Changes</summary>

Disable libstdc++ assertions in the runtime library just like in https://reviews.llvm.org/D143168.

---
Full diff: https://github.com/llvm/llvm-project/pull/81029.diff


1 Files Affected:

- (modified) openmp/runtime/src/CMakeLists.txt (+4) 


``````````diff
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index b0ecf1213dabe5..ff129feb5b6fa0 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -152,6 +152,10 @@ if(UNIX)
   set(LIBOMP_DL_LIBS ${CMAKE_DL_LIBS})
 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 the OpenMP library
 libomp_get_ldflags(LIBOMP_CONFIGURED_LDFLAGS)
 

``````````

</details>


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


More information about the Openmp-commits mailing list