cppcoro icon indicating copy to clipboard operation
cppcoro copied to clipboard

Add support for building with Clang under Windows

Open lewissbaker opened this issue 6 years ago • 3 comments

lewissbaker avatar Aug 20 '17 11:08 lewissbaker

What's the target changes for this issue? Does it mean cakefile changes? It seems out-of-bounds to overwrite the experimental/coroutine header, particularly since libcxx's works fine. I'm getting some "instruction does not dominate all uses" compiler crashes in the tests (that I'm looking at reducing now that it happens with things other than PPL and my own bad code), but the core library builds fine.

mwinterb avatar Apr 30 '18 20:04 mwinterb

I was wrong, the current version of experimental/coroutine from libcxx needs some manual preprocessing to compile cleanly (or perhaps it always did and I just forgot I did so 10 months ago). Even still, providing a coroutine_handle implementation in this library seems out-of-scope.

mwinterb avatar Apr 30 '18 21:04 mwinterb

The first step is the cakefile work required to get a build of clang (or clang-cl) building and linking correctly.

From memory, I was running into problems trying to use clang-cl (which pulls in some MSVC headers) in conjunction with libc++. I also think clang-cl had some command-line limitations that made it difficult to override the system header include paths.

I think after working around some of these issues with some hacks I was still running into issues at link time with missing symbols, however.

I must admit it was quite a while ago that I last tried to get it working, so things may have gotten better with clang/clang-cl on windows since then.

lewissbaker avatar May 03 '18 13:05 lewissbaker