Skip to content

bwtang/llgo

This branch is 29 commits behind go-llvm/llgo:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
Mar 26, 2014
Aug 2, 2014
Jun 24, 2014
Jul 31, 2014
Jun 27, 2014
Jul 20, 2014
Jul 7, 2014
Jul 22, 2014
Mar 2, 2013
Aug 2, 2014
Jul 30, 2014
Jul 31, 2014
Jul 30, 2014
Jun 2, 2014
May 6, 2014
Jun 2, 2014
Jul 30, 2014

Repository files navigation

Build Status

llgo

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.

Installation

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 github.com/go-llvm/llgo/cmd/gllgo
cd $GOPATH/src/github.com/go-llvm/llvm
./update_llvm.sh -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host
cd ../llgo
make install prefix=/path/to/prefix j=N  # where N is the number of cores on your machine.

Running

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.

About

LLVM-based compiler for Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published