Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 23dea24

Browse files
committed
Merge pull request #205 from pcc/readme
Fix a mistake in the instructions and document more clearly the required...
2 parents d81a682 + 529733a commit 23dea24

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,28 @@ Progress will be reported on the [mailing list](https://groups.google.com/d/foru
99

1010
# Installation
1111

12-
To install llgo, use make:
12+
llgo requires:
13+
* Go 1.3 or later.
14+
* [CMake](http://cmake.org/) 2.8.8 or later (to build LLVM).
15+
* A [modern C++ toolchain](http://llvm.org/docs/GettingStarted.html#getting-a-modern-host-c-toolchain) (to build LLVM).
1316

14-
go get github.com/go-llvm/llgo
15-
cd $GOPATH/src/github.com/go-llvm/llgo
16-
make install prefix=/path/to/prefix
17+
Note that Ubuntu Precise is one Linux distribution which does not package a sufficiently new CMake or C++ toolchain.
1718

18-
You may need to build LLVM. See GoLLVM's README.md for more information.
19+
If you built a newer GCC following the linked instructions above, you will need to set the following environment variables before proceeding:
1920

20-
llgo requires Go 1.3 or later.
21+
export PATH=/path/to/gcc-inst/bin:$PATH
22+
export LD_LIBRARY_PATH=/path/to/gcc-inst/lib64:$LD_LIBRARY_PATH
23+
export CC=`which gcc`
24+
export CXX=`which g++`
25+
26+
To build and install llgo:
27+
28+
# Ensure $GOPATH is set.
29+
go get -d github.com/go-llvm/llgo/cmd/gllgo
30+
cd $GOPATH/src/github.com/go-llvm/llvm
31+
./update_llvm.sh -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host
32+
cd ../llgo
33+
make install prefix=/path/to/prefix j=N # where N is the number of cores on your machine.
2134

2235
# Running
2336

0 commit comments

Comments
 (0)