From e2f6e6fb5bf92f64337e45503e18f759a49c98fd Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 31 Jan 2020 11:32:59 +0200 Subject: [PATCH] Add llvm-mingw instructions. --- Installing-a-C-compiler-on-Windows.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Installing-a-C-compiler-on-Windows.md b/Installing-a-C-compiler-on-Windows.md index c0a99c4..5b4f69c 100644 --- a/Installing-a-C-compiler-on-Windows.md +++ b/Installing-a-C-compiler-on-Windows.md @@ -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.