Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

Install llvm on osx or linux

Joshua Brunhuber edited this page Dec 12, 2015 · 1 revision

This is a short instruction how to get llvm. For more information and a more detailed tutorial visit the llvm page

Mac OS X

I presume you have installed the following applications: xcode and cmake.

Linux

elementaryOS used in this tutorial

You need following tools:

You can install gcc with apt sudo apt-get install build-essential

Subversion with sudo apt-get install subversion

LLVM

what is llvm?

Locate a place where you want to clone the llvm sources.

cd where-you-want-llvm-to-live

Then checkout the sources.

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm

Create a new folder and go in it. Then type:

cmake ..
make
make install

This will install llvm on your system.

You can additionally install clang if you want on Linux. Check out the clang documentation

gtest

I use gtest as unit testing framework. What is gtest?

clone gtest. Then go in the unzipped folder and create a build folder again. Go in it and then do the same above.

cmake ..
make

Now we have to install the libraries:

cp -r ../include/gtest /usr/local/include
cp lib*.a /usr/local/lib
Clone this wiki locally