File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,12 @@ function (add_flangrt_library name)
286286 # For Flang-RT's configured config.h to be found
287287 target_include_directories (${tgtname} PRIVATE "${FLANG_RT_BINARY_DIR} " )
288288
289+ # Define our own _GLIBCXX_THROW_OR_ABORT because libstdc++ headers
290+ # reference std::exception in its definition, and we do not want
291+ # to link against std::exception since doing that would link us to
292+ # the C++ runtime.
293+ target_compile_definitions (${tgtname} PUBLIC "_GLIBCXX_THROW_OR_ABORT=(__builtin_abort())" )
294+
289295 # Disable libstdc++/libc++ assertions, even in an LLVM_ENABLE_ASSERTIONS
290296 # build, to avoid an unwanted dependency on libstdc++/libc++.so.
291297 target_compile_definitions (${tgtname} PUBLIC _GLIBCXX_NO_ASSERTIONS)
You can’t perform that action at this time.
0 commit comments