Add llvm-mingw instructions.

Delyan Angelov 2020-01-31 11:32:59 +02:00
parent 2d9e7f133a
commit e2f6e6fb5b

@ -1,4 +1,4 @@
You can use either MinGW-w64 or Visual Studio. Visual Studio takes a lot more space, but its header files are more up-to-date, so Visual Studio is preferred if you plan to use the UI library.
You can use either MinGW-w64 or Visual Studio or llvm-mingw. Visual Studio takes a lot more space, but its header files are more up-to-date, so Visual Studio is preferred if you plan to use the UI library.
V uses recent Windows features like UTF-8 and color output support in console, IPv6 and native TLS support on sockets, etc. Windows 10 Fall Creators Update (**1709**) or later is the recommended Windows version for most complete compatibility. Windows 7, Windows 8(.1), and Windows 10 before Fall Creators Update are supported too but programs may lack some features and/or it may be hard to correctly link/redistribute recent C runtime library especially when using GNU C compiler.
@ -28,3 +28,19 @@ make
NB: on windows, the make.bat file first tries to locate gcc from MinGW-w64, and will use it, if it finds it. If not, it will try MSVC. If you want use MSVC, when you have both MinGW-w64 AND MSVC, you can pass:
`make -msvc`
#### llvm-mingw
You can get a recent build of llvm-mingw from https://github.com/mstorsjo/llvm-mingw/releases .
The main benefit with this compiler toolchain, is that the released archives are self contained - there is NO installation necessary. Just ~516MB of disk space.
1) download a .zip file from the link above.
2) unpack the downloaded .ZIP archive into a folder, say c:\llvm
3) put c:\llvm in your PATH.
*or*
3) use `v -cc c:\llvm\bin\gcc.exe` when compiling your v source.
If you do not want to use this C compiler toolchain anymore, you simply delete the folder c:\llvm , where you unpacked the llvm-mingw compiler.