[cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows

KOLANICH via cfe-users cfe-users at lists.llvm.org
Mon Nov 12 22:38:58 PST 2018

Hello, Maarten.

I have partially built LLVM with MinGW-w64 8.1.0 (some llvm shared libs needed, not clang and stdlib). 

For experimenting with build I personally recommend using ninja instead of mingw32-make because it allows resuming without rebuilding everything from scratch if I added a linker flag into a CMake cache variable.

> So I think it would have been better to select the Mingw-w64 x86_64-win32-seh or even x86_64-win32-sjlj version instead?

I guess, no. If something somewhere uses std::thread and other threading stuff, you will have problems since "win32" versions of the toolchain lack it since it is implemented upon pthreads.

> 'InitOnceExecuteOnce' was not declared in this scope

some header is needed and it exists in MinGW since I get another error that the symbol is not found on linking stage (so yo may have problem with it anyway).

More information about the cfe-users mailing list