Prabir's Blog

where the tech matters...

Compiling LLVM

July 03
by prabir 3. July 2009 09:53

I have been working on a project called LLVM# - Native C# compiler. For that I needed to compile LLVM (even though they provide official binary bit of LLVM).

(For windows users please use cygwin or mingw to compile.)

This tutorial teaches you how to compile LLVM version 2.5.

Download the llvm source code

wget http://llvm.org/releases/2.5/llvm-2.5.tar.gz

Note: For windows users who don't have wget you can download from here. or manually download the llvm source code from the official download links.

Extracting the source code

tar xzf llvm-2.5.tar.gz

Note: For windows users you can obtain the tar binaries from here or use your favorite file extractor.

Compiling

mkdir llvm-2.5-obj
cd llvm-2.5-obj
../llvm-2.5/configure --enable-optimized
make
sudo make install

Note: Please make sure that make is also installed. For windows user you do not need to run as the root user. You can just type make install.
For the offical up-to-date version of compiling llvm, please refer to the official site at http://llvm.org/docs/GettingStarted.html

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags:

LLVM# – Native C# Compiler

May 19
by prabir 19. May 2009 22:49

Right now I’m quite busy working on with my senior project called LLVM# compiler. Its main objective is to be able to write the code in C# and execute the code as a native C or C++ application by converting the C# code to LLVM (Low Level Virtual Machine). This project will tend to remove the dependency of C# from the .net framework, the mono runtime or the portable.net runtime engine. The project is being discussed at the moment but if you want to have a look at what’s happening, please do check the official website of LLVM# compiler at http://projects.prabir.me/compiler.

For more info on LLVM click here.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

C#