Hi Alex,
I haven't worked with Go on Windows in a year, so my knowledge
might be out of date... That said, I found CGO very sensitive to
the exact C compiler used, and even within GCC, the exact version.
Here is the version that I had working at one point in the last couple of years:
mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0 (somewhere on sourceforge I think).
Mind you, I'm not saying you cannot get Clang to work. I'm just suggesting
that if you start with a positive control (that does let you build), then you
can confidently try other compilers knowing that everything else is held the same.
Or you might have gotten what you need with the mingw-w64 gcc, and that's
good enough.
Let me know if you are able to make Clang work--it would be an interesting data point.
Best,
Jason