[Openmp-commits] [openmp] [OpenMP] Remove unwanted dependency on libstdc++ for libomp (PR #73249)

Tim Gymnich via Openmp-commits openmp-commits at lists.llvm.org
Fri Nov 24 04:06:07 PST 2023


================
@@ -135,6 +135,11 @@ libomp_get_asmflags(LIBOMP_CONFIGURED_ASMFLAGS)
 set_source_files_properties(${LIBOMP_CXXFILES} PROPERTIES COMPILE_FLAGS "${LIBOMP_CONFIGURED_CXXFLAGS}")
 set_source_files_properties(${LIBOMP_ASMFILES} ${LIBOMP_GNUASMFILES} PROPERTIES COMPILE_FLAGS "${LIBOMP_CONFIGURED_ASMFLAGS}")
 
+# Disable libstdc++/libc++ assertions, even in an LLVM_ENABLE_ASSERTIONS build,
+# to avoid an unwanted dependency on libstdc++/libc++.so.
+add_definitions(-U_GLIBCXX_ASSERTIONS)
----------------
tgymnich wrote:

I couldn't find a way to undefine a definiton with `add_compile_definitions`.  There also exists a similar patch already for flang: https://reviews.llvm.org/D143168


https://cmake.org/cmake/help/latest/command/add_definitions.html
https://cmake.org/cmake/help/latest/command/add_compile_definitions.html#command:add_compile_definitions

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


More information about the Openmp-commits mailing list