Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Commit b1d69b7

Browse files
authored
[OpenMP] Remove unwanted dependency on libstdc++ for libomp (#258)
Disable libstdc++/libc++ assertions, in an `LLVM_ENABLE_ASSERTIONS` build, to avoid an unwanted dependency on libstdc++/libc++.so. fixes #73248 Note: Applies upstream diff: llvm/llvm-project#73249
1 parent 1657ee7 commit b1d69b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

openmp/runtime/src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ libomp_get_asmflags(LIBOMP_CONFIGURED_ASMFLAGS)
139139
set_source_files_properties(${LIBOMP_CXXFILES} PROPERTIES COMPILE_FLAGS "${LIBOMP_CONFIGURED_CXXFLAGS}")
140140
set_source_files_properties(${LIBOMP_ASMFILES} ${LIBOMP_GNUASMFILES} PROPERTIES COMPILE_FLAGS "${LIBOMP_CONFIGURED_ASMFLAGS}")
141141

142+
# Disable libstdc++/libc++ assertions, even in an LLVM_ENABLE_ASSERTIONS build,
143+
# to avoid an unwanted dependency on libstdc++/libc++.so.
144+
add_definitions(-U_GLIBCXX_ASSERTIONS)
145+
add_definitions(-U_LIBCPP_ENABLE_ASSERTIONS)
146+
142147
# Remove any cmake-automatic linking of the standard C++ library.
143148
# We neither need (nor want) the standard C++ library dependency even though we compile c++ files.
144149
if(NOT ${LIBOMP_USE_STDCPPLIB})

0 commit comments

Comments
 (0)