Skip to content

Commit

Permalink
Revert "co/Compat: remove obsolete Windows workaround"
Browse files Browse the repository at this point in the history
This reverts commit 5252eb3.  The
workaround is still needed after all because the GitHub CI has only
GCC-mingw 10.
  • Loading branch information
Max Kellermann committed Sep 1, 2023
1 parent 8694c9a commit c58e1c7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/co/Compat.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ using std::experimental::noop_coroutine;

#else /* not clang */

#if defined __GNUC__ && defined _WIN32
#if __GNUC__ == 10
namespace std {
inline namespace __n4861 {
/* workaround for Windows linker error "multiple definition of ..."
with GCC10: these two symbols are declared as "weak", but only
adding "inline" and "selectany" makes the linker failure go away */
inline void __dummy_resume_destroy();
extern struct __noop_coro_frame __noop_coro_fr __attribute__((selectany));
}}
#endif
#endif

#include <coroutine>
#ifndef __cpp_impl_coroutine
#error Need -fcoroutines
Expand Down

0 comments on commit c58e1c7

Please sign in to comment.