File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
flang/include/flang/Common Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,17 @@ using cuda::std::variant_size_v;
2424using cuda::std::visit;
2525} // namespace std
2626#else // !RT_USE_LIBCUDACXX
27+
28+ // initializer_list is included to load bits/c++config, which can't be included
29+ // directly and which defines a macro we need to redefine.
2730#include < initializer_list>
31+
32+ // Redefine problematic abort macro to avoid defining symbols related to
33+ // std::exception. std::exception is defined in the C++ runtime library, which
34+ // we do not want the Fortran runtime library to depend on.
2835#undef _GLIBCXX_THROW_OR_ABORT
2936#define _GLIBCXX_THROW_OR_ABORT (_EXC ) (__builtin_abort())
37+
3038#include < variant>
3139#endif // !RT_USE_LIBCUDACXX
3240
You can’t perform that action at this time.
0 commit comments