The attached Windows executable terminates without ever reaching main(). A GDB session quickly reveals that the problem is in SOME static constructor somewhere in the gigantic execuctable (there are 70+ entries in __CTOR_LIST), which links in all of the LLVM libraries. The problem is that stack errors are not caught by the __main() function in gccmain.c. So the program simply terminates without telling the user what's going on. Ideally, it would report some address or something that one could use to search through a map file and locate the offending constructor. The program works on Linux/x64 and Linux/ARM, but not on MinGW-w64. The official LLVM sample, Kaleidoscope, crashes in an identical manner so I suppose the problem is somehow related to the way the LLVM libraries are linked or used.