This repository was archived by the owner on Dec 14, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,28 @@ Progress will be reported on the [mailing list](https://groups.google.com/d/foru
9
9
10
10
# Installation
11
11
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).
13
16
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.
17
18
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:
19
20
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.
21
34
22
35
# Running
23
36
You can’t perform that action at this time.
0 commit comments