Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Clang compiler should I download?

Tags:

I want to install Clang compliler on my system. I went to this link, but so many download options out there confused me, as to which version should I download?

I'm using Dell's laptop : Windows 7 Basic 64-bit. I've already installed MinGW version 4.5.0. I've also installed Visual Studio 2008 as well as 2010.

What do you think is the best choice for me? Which Clang should I download? How should I configure it? I'm going to use Clang for the first time. So suggest me the best options!

By the way, can I configure Clang (or Visual Studio) so that Visual Studio may use Clang compiler to compile my C and C++ code?


EDIT:

What does it mean when the download page cryptically says "Front End Binaries for Mingw32/x86"?

like image 731
Nawaz Avatar asked Feb 20 '11 13:02

Nawaz


People also ask

Should I use clang ++ or g ++?

Clang is much faster and uses far less memory than GCC. Clang aims to provide extremely clear and concise diagnostics (error and warning messages), and includes support for expressive diagnostics. GCC's warnings are sometimes acceptable, but are often confusing and it does not support expressive diagnostics.

Is Clang a good compiler?

Clang is not just like any other compiler, it comes with an Infrastructure that allows it to build tools and it can also extend its behaviors easily. The LLVM/Clang source code includes many tools while others are available on the web. Clang can be used as a very good C/C++ parser for building tools.

What is Clang C compiler?

clang is a C, C++, and Objective-C compiler which encompasses preprocessing, parsing, optimization, code generation, assembly, and linking. Depending on which high-level mode setting is passed, Clang will stop before doing a full link.


2 Answers

You can use Clang with Visual Studio or MinGW. The choice is yours. But you'll need an external linker to produce Windows executables (MSVS's link.exe or MinGW's ld.exe/g++.exe).

If you want to use MinGW, download the next to last item (frontend binaries to mingw).

You can also compile Clang/LLVM from source, for that see here. This allows you to try out MSVS or MinGW(-w64). You'll need CMake for the build process.

UPDATE: regarding your edit: the "frontend" description reflects either the fact that llvm can be used as a backend in a GCC compilation through llvm-gcc (google has loads of info on this) or the fact that Clang itself is unable to link your code together into an executable or library. You still need the system's linker as I described above.

like image 71
rubenvb Avatar answered Sep 30 '22 18:09

rubenvb


Clang now started releasing Windows snapshot builds

like image 36
KindDragon Avatar answered Sep 30 '22 16:09

KindDragon