Apple's fork of clang should be able to handle the source, but some of the tests fails with a segmentation fault.
FWIW, here's the log:
llvm-ar: /usr/bin/ar
Building with /Users/mickey/Documents/late/misc/cppcoro/config.cake - Variant(release='optimised', platform='darwin', architecture='x64', compiler='clang')
Building with /Users/mickey/Documents/late/misc/cppcoro/config.cake - Variant(release='debug', platform='darwin', architecture='x64', compiler='clang')
Compiling lib/async_auto_reset_event.cpp
Compiling lib/async_manual_reset_event.cpp
Compiling lib/async_mutex.cpp
Compiling lib/cancellation_state.cpp
Compiling lib/cancellation_token.cpp
Compiling lib/cancellation_source.cpp
Compiling lib/cancellation_registration.cpp
Compiling lib/lightweight_manual_reset_event.cpp
Compiling lib/ip_address.cpp
Compiling lib/ip_endpoint.cpp
Compiling lib/ipv4_address.cpp
Compiling lib/ipv4_endpoint.cpp
Compiling test/static_thread_pool_tests.cpp
Compiling test/ipv6_endpoint_tests.cpp
Compiling test/ipv6_address_tests.cpp
Compiling test/ipv4_endpoint_tests.cpp
Compiling test/ipv4_address_tests.cpp
Compiling test/ip_endpoint_tests.cpp
Compiling test/ip_address_tests.cpp
Compiling test/when_all_ready_tests.cpp
Compiling test/when_all_tests.cpp
Compiling test/multi_producer_sequencer_tests.cpp
Compiling test/single_producer_sequencer_tests.cpp
Compiling test/single_consumer_async_auto_reset_event_tests.cpp
Compiling test/sync_wait_tests.cpp
Compiling test/shared_task_tests.cpp
Compiling test/sequence_barrier_tests.cpp
Compiling test/task_tests.cpp
Compiling test/cancellation_token_tests.cpp
Compiling test/async_latch_tests.cpp
Compiling test/async_mutex_tests.cpp
Compiling test/async_manual_reset_event_tests.cpp
Compiling test/async_auto_reset_event_tests.cpp
Compiling test/async_generator_tests.cpp
Compiling test/recursive_generator_tests.cpp
Compiling test/generator_tests.cpp
Compiling test/counted.cpp
Compiling test/main.cpp
Compiling lib/spin_mutex.cpp
Compiling lib/spin_wait.cpp
Compiling lib/auto_reset_event.cpp
Compiling lib/static_thread_pool.cpp
Compiling lib/ipv6_endpoint.cpp
Compiling lib/ipv6_address.cpp
Compiling lib/ipv4_endpoint.cpp
test/recursive_generator_tests.cpp:156:2: warning: control reaches end of non-void lambda [-Wreturn-type]
};
^
test/recursive_generator_tests.cpp:160:11: note: in instantiation of function template specialization '_DOCTEST_ANON_FUNC_16()::(anonymous class)::operator()<(lambda at test/recursive_generator_tests.cpp:148:11)>' requested here
return f(n, f);
^
test/recursive_generator_tests.cpp:237:2: warning: control may reach end of non-void lambda [-Wreturn-type]
};
^
test/recursive_generator_tests.cpp:239:14: note: in instantiation of function template specialization '_DOCTEST_ANON_FUNC_20()::(anonymous class)::operator()<(lambda at test/recursive_generator_tests.cpp:219:11) &>' requested here
auto gen = f(0, f);
^
test/recursive_generator_tests.cpp:297:2: warning: control may reach end of non-void lambda [-Wreturn-type]
};
^
test/recursive_generator_tests.cpp:299:14: note: in instantiation of function template specialization '_DOCTEST_ANON_FUNC_22()::(anonymous class)::operator()<(lambda at test/recursive_generator_tests.cpp:252:11) &>' requested here
auto gen = f(1, f);
^
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /Users/mickey/Documents/late/misc/cppcoro/recursive_generator_tests-11c439.cpp
clang: note: diagnostic msg: /Users/mickey/Documents/late/misc/cppcoro/recursive_generator_tests-11c439.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/mickey/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg:
********************
/usr/bin/clang: failed with exit code 254
Compiling lib/ipv4_address.cpp
Compiling lib/ip_endpoint.cpp
Compiling lib/ip_address.cpp
Compiling lib/lightweight_manual_reset_event.cpp
Compiling lib/cancellation_registration.cpp
Compiling lib/cancellation_source.cpp
Compiling lib/cancellation_token.cpp
Compiling lib/cancellation_state.cpp
Compiling lib/async_mutex.cpp
Compiling lib/async_manual_reset_event.cpp
Compiling lib/async_auto_reset_event.cpp
Compiling test/static_thread_pool_tests.cpp
Compiling test/ipv6_endpoint_tests.cpp
Compiling test/ipv6_address_tests.cpp
Compiling test/ipv4_endpoint_tests.cpp
Compiling test/ipv4_address_tests.cpp
Compiling test/ip_endpoint_tests.cpp
Compiling test/ip_address_tests.cpp
Compiling test/when_all_ready_tests.cpp
Compiling test/when_all_tests.cpp
Archiving build/darwin_x64_clang11.0.3_debug/lib/libcppcoro.a
Compiling test/multi_producer_sequencer_tests.cpp
Compiling test/single_producer_sequencer_tests.cpp
Compiling test/single_consumer_async_auto_reset_event_tests.cpp
Compiling test/sync_wait_tests.cpp
Compiling test/shared_task_tests.cpp
Compiling test/sequence_barrier_tests.cpp
Compiling test/task_tests.cpp
Compiling test/cancellation_token_tests.cpp
Compiling test/async_latch_tests.cpp
Compiling test/async_mutex_tests.cpp
Compiling test/async_manual_reset_event_tests.cpp
Compiling test/async_auto_reset_event_tests.cpp
Compiling test/async_generator_tests.cpp
Compiling test/recursive_generator_tests.cpp
Compiling test/generator_tests.cpp
Compiling test/counted.cpp
Compiling test/main.cpp
Compiling lib/spin_mutex.cpp
Compiling lib/spin_wait.cpp
Compiling lib/auto_reset_event.cpp
Compiling lib/static_thread_pool.cpp
test/recursive_generator_tests.cpp:156:2: warning: control reaches end of non-void lambda [-Wreturn-type]
};
^
test/recursive_generator_tests.cpp:160:11: note: in instantiation of function template specialization '_DOCTEST_ANON_FUNC_16()::(anonymous class)::operator()<(lambda at test/recursive_generator_tests.cpp:148:11)>' requested here
return f(n, f);
^
test/recursive_generator_tests.cpp:237:2: warning: control may reach end of non-void lambda [-Wreturn-type]
};
^
test/recursive_generator_tests.cpp:239:14: note: in instantiation of function template specialization '_DOCTEST_ANON_FUNC_20()::(anonymous class)::operator()<(lambda at test/recursive_generator_tests.cpp:219:11) &>' requested here
auto gen = f(0, f);
^
test/recursive_generator_tests.cpp:297:2: warning: control may reach end of non-void lambda [-Wreturn-type]
};
^
test/recursive_generator_tests.cpp:299:14: note: in instantiation of function template specialization '_DOCTEST_ANON_FUNC_22()::(anonymous class)::operator()<(lambda at test/recursive_generator_tests.cpp:252:11) &>' requested here
auto gen = f(1, f);
^
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /Users/mickey/Documents/late/misc/cppcoro/recursive_generator_tests-989e04.cpp
clang: note: diagnostic msg: /Users/mickey/Documents/late/misc/cppcoro/recursive_generator_tests-989e04.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/mickey/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg:
********************
/usr/bin/clang: failed with exit code 254
Compiling lib/ipv6_endpoint.cpp
Compiling lib/ipv6_address.cpp
Archiving build/darwin_x64_clang11.0.3_optimised/lib/libcppcoro.a
clang: error: unable to execute command: Killed: 9
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /Users/mickey/Documents/late/misc/cppcoro/async_generator_tests-9c9e47.cpp
clang: note: diagnostic msg: /Users/mickey/Documents/late/misc/cppcoro/async_generator_tests-9c9e47.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/mickey/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg:
********************
/usr/bin/clang: failed with exit code 254
Build failed with 3 errors.
The following targets failed to build:
- build/darwin_x64_clang11.0.3_debug/test/obj/recursive_generator_tests.o
- build/darwin_x64_clang11.0.3_optimised/test/obj/recursive_generator_tests.o
- build/darwin_x64_clang11.0.3_optimised/test/obj/async_generator_tests.o
Build took 0:17:32.564.```
Did anyone compile this successfully for macOS?
Apple's fork of clang should be able to handle the source, but some of the tests fails with a segmentation fault.
FWIW, here's the log: