LLVM bindings for the Go programming language
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 59 commits behind go-llvm:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples/factorial
include
llvm
.gitignore
LICENSE
README.md
install.sh

README.md

GoLLVM

LLVM bindings for The Go Programming Language.

Prerequisites

  • LLVM 3.1+. LLVM must have been built with shared libraries enabled.
  • Go 1.0+.

The author has only built and tested with Linux, but there is no particular reason why GoLLVM should not work with other operating systems.

Installation

To install, run the following (assuming you have curl and Go installed):

curl https://raw.github.com/axw/gollvm/master/install.sh | sh

Alternatively, you can use go get directly, but you must then set the CGO_CFLAGS and CGO_LDFLAGS environment variables:

$ export CGO_CFLAGS=`llvm-config --cflags`
$ export CGO_LDFLAGS="`llvm-config --ldflags` -Wl,-L`llvm-config --libdir` -lLLVM-`llvm-config --version`"
$ go get github.com/axw/gollvm/llvm