Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use clang/llvm with Eclipse CDT

Is it possible to use Clang/LLVM with Eclipse CDT and if so, how is it configured to actually make it work?

like image 821
Alexander Battisti Avatar asked Apr 27 '11 10:04

Alexander Battisti


People also ask

Does Clang work for C?

The Clang project provides a language front-end and tooling infrastructure for languages in the C language family (C, C++, Objective C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.

Does LLVM use Clang?

Clang operates in tandem with the LLVM compiler back end and has been a subproject of LLVM 2.6 and later. As with LLVM, it is free and open-source software under the Apache License 2.0 software license. Its contributors include Apple, Microsoft, Google, ARM, Sony, Intel, and AMD.

Does Clang support C ++ 11?

C++11 implementation statusYou can use Clang in C++11 mode with the -std=c++11 option. Clang's C++11 mode can be used with libc++ or with gcc's libstdc++.

Is LLVM same as Clang?

LLVM is a backend compiler meant to build compilers on top of it. It deals with optimizations and production of code adapted to the target architecture. CLang is a front end which parses C, C++ and Objective C code and translates it into a representation suitable for LLVM.


1 Answers

I am the main author of the (only) LLVM plug-in for Eclipse CDT. It is still in development so might not be suitable for production environment yet. However feel free to test it to find out if it is suitable for your needs.

https://github.com/TuononenP/llvm4eclipsecdt

UPDATE The latest version is available via official Eclipse update site: http://download.eclipse.org/releases/mars

It is under Programming Languages and is named "C/C++ LLVM-Family Compiler Build Support".

like image 78
Petri Tuononen Avatar answered Sep 20 '22 16:09

Petri Tuononen