-
Notifications
You must be signed in to change notification settings - Fork 7
/
LLVM.mw
41 lines (27 loc) · 1.59 KB
/
LLVM.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
= About =
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful libraries that can be used to build them.
This page describes the port of LLVM for the OpenRISC 1000 architecture.
Further generic information on the [http://llvm.org LLVM project's webpage].
= Getting started =
The most up-to-date development currently takes place at [https://github.com/openrisc https://github.com/openrisc].
In order to be able to compile C/C++ programs, two components are required, Clang and LLVM.
Start with checking out LLVM
<nowiki>git clone git://github.com/openrisc/llvm-or1k.git</nowiki>
and Clang
<nowiki>git clone git://github.com/openrisc/clang-or1k.git</nowiki>
Clang is held in it's own repository as it is a seperate project from LLVM,
but is meant to be built together with LLVM in the LLVM tree.
Create a symlink to the checked out Clang repository in the LLVM tree
<nowiki>cd llvm-or1k/tools/
ln -s ../../clang-or1k/ clang</nowiki>
go back to the top directory where you you checked out Clang and LLVM and create a build directory
<nowiki>cd ../../
mkdir build
cd build</nowiki>
LLVM has support for both autotools and cmake based configuration, use the one that suits you best.
cmake:
<nowiki>cmake ../llvm-or1k -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/path/to/instdir</nowiki>
autotools:
<nowiki>../llvm-or1k/configure CC=gcc CXX=g++ --enable-debug-runtime --prefix=/path/to/instdir</nowiki>
and finally build and install
<nowiki>make install</nowiki>