Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Go-llvm/llGo
LLVM-based compiler for Go
https://github.com/Go-llvm/llGo
Last synced: 20 days ago
JSON representation
LLVM-based compiler for Go
- Host: GitHub
- URL: https://github.com/Go-llvm/llGo
- Owner: go-llvm
- License: other
- Archived: true
- Created: 2011-11-05T14:23:32.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-01-05T01:15:37.000Z (almost 10 years ago)
- Last Synced: 2024-10-16T09:26:48.938Z (28 days ago)
- Language: Go
- Homepage:
- Size: 4 MB
- Stars: 1,254
- Watchers: 66
- Forks: 81
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# llgo
**This project has moved to llvm.org. Any contributions or bug reports should be sent there. Please refer to the [llgo readme](http://llvm.org/svn/llvm-project/llgo/trunk/README.TXT) for more information.**
llgo is a [Go](http://golang.org) frontend for [LLVM](http://llvm.org), 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](https://groups.google.com/d/forum/llgo-dev).
# Installation
llgo requires:
* Go 1.3 or later.
* [CMake](http://cmake.org/) 2.8.8 or later (to build LLVM).
* A [modern C++ toolchain](http://llvm.org/docs/GettingStarted.html#getting-a-modern-host-c-toolchain) (to build LLVM).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-instTo build and install llgo:
# Ensure $GOPATH is set.
go get -d github.com/go-llvm/llgo/cmd/gllgo
$GOPATH/src/llvm.org/llvm/bindings/go/build.sh -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host
cd $GOPATH/src/github.com/go-llvm/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.