From 73ddc4540f5f85ef9e01be4e2e362c6c88e47fa3 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Tue, 19 Mar 2024 18:02:22 +0100 Subject: libutil: generator type with on-yield value mapping this will be the basis of non-boost coroutines in lix. anything that is a boost coroutine *should* be representable with a Generator coroutine, and many things that are not currently boost coroutines but behave much like one (such as, notably, serializers) should be as well. this allows us to greatly simplify many things that look like iteration but aren't. Change-Id: I2cebcefa0148b631fb30df4c8cfa92167a407e34 --- meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 7d8a3a315..a208151ac 100644 --- a/meson.build +++ b/meson.build @@ -142,6 +142,16 @@ else cpp_pch = [] endif +# gcc 12 is known to miscompile some coroutine-based code quite horribly, +# causing (among other things) copies of move-only objects and the double +# frees one would expect when the objects are unique_ptrs. these problems +# often show up as memory corruption when nesting generators (since we do +# treat generators like owned memory) and will cause inexplicable crashs. +assert( + cxx.get_id() != 'gcc' or cxx.version().version_compare('>=13'), + 'GCC 12 and earlier are known to miscompile lix coroutines, use GCC 13 or clang.' +) + # Translate some historical and Mesony CPU names to Lixy CPU names. # FIXME(Qyriad): the 32-bit x86 code is not tested right now, because cross compilation for Lix -- cgit v1.2.3