Skip to content


Subversion checkout URL

You can clone with
Download ZIP
LLVM-based compiler for Go
Go Shell R
Pull request Compare This branch is 4 commits behind go-llvm:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
build Update import paths
debug Move to upstream LLVM bindings
irgen Use mangleFunctionName to mangle anonymous function parents
ssaopt Allocation stack lowering based on escape analysis
utils/benchcomp Teach analyze.R to tolerate zeros in the benchmark output
.travis.yml Move to upstream LLVM bindings
LICENSE Use "The llgo Authors" in copyright
Makefile Move to upstream LLVM bindings Move to upstream LLVM bindings Overhaul script:
libgo-noext.diff Add scripts and Makefile for bootstrapping and installing llgo Move to upstream LLVM bindings

Build Status


llgo is a Go frontend for LLVM, written in Go.

llgo is under active development. It compiles and passes most of the standard library test suite and a substantial portion of the gc test suite, but there are some corner cases that are known not to be handled correctly yet. Nevertheless it can compile modestly substantial programs (including itself; it is self hosting on x86-64 Linux).

Progress will be reported on the mailing list.


llgo requires:

Note that Ubuntu Precise is one Linux distribution which does not package a sufficiently new CMake or C++ toolchain.

If you built a newer GCC following the linked instructions above, you will need to set the following environment variables before proceeding:

export PATH=/path/to/gcc-inst/bin:$PATH
export LD_LIBRARY_PATH=/path/to/gcc-inst/lib64:$LD_LIBRARY_PATH
export CC=`which gcc`
export CXX=`which g++`
export LIBGO_CFLAGS=--gcc-toolchain=/path/to/gcc-inst

To build and install llgo:

# Ensure $GOPATH is set.
go get -d
cd $GOPATH/src/
make install prefix=/path/to/prefix j=N  # where N is the number of cores on your machine.


We install two binaries to $prefix/bin: llgo and llgo-go.

llgo is the compiler binary. It has a command line interface that is intended to be compatible to a large extent with gccgo.

llgo-go is a command line wrapper for go. It works like the regular go command except that it uses llgo to build.

Something went wrong with that request. Please try again.