llvm-capstone/llgo
Peter Collingbourne 7d39641c80 Roll gotools to d4e70101.
Most importantly, this gives us https://go-review.googlesource.com/7533 which
fixes a bug in go/ssa that caused test failures in the Go 1.4 standard library.

Also remove the go1.4 tag workaround. We no longer need it now that we
ship llgo-go.

Differential Revision: http://reviews.llvm.org/D8827

llvm-svn: 234133
2015-04-05 23:28:18 +00:00
..
build
cmd llgoi: Fix type identity for imported binary packages. 2015-03-18 08:34:40 +00:00
debug [llgo] debug: create replaceable type through DIBuilder 2015-03-02 12:42:45 +00:00
driver irgen, driver: modify Compiler.Compile to take a FileSet and Files 2014-12-31 00:25:32 +00:00
include
irgen Roll gotools to d4e70101. 2015-04-05 23:28:18 +00:00
ssaopt Roll gotools to 47f2109c. 2015-01-13 20:45:08 +00:00
test llgoi: Fix type identity for imported binary packages. 2015-03-18 08:34:40 +00:00
third_party Roll gotools to d4e70101. 2015-04-05 23:28:18 +00:00
utils/benchcomp
.arcconfig Add .arcconfig file. 2014-12-08 20:12:22 +00:00
CMakeLists.txt Add llgo-go to installation. 2015-03-18 07:35:17 +00:00
libgo-check-failures.diff [llgo] Disable known failing packages in check-libgo 2015-03-06 02:49:07 +00:00
libgo-noext.diff Roll gofrontend to 0fde0b6a7eb2 2015-02-13 22:59:07 +00:00
LICENSE.TXT [llgo] update year in LICENSE.txt 2015-03-13 01:36:02 +00:00
llgo-go.sh
README.TXT Test commit to check the new git mirror. 2015-01-07 21:28:10 +00:00
update_third_party.sh Roll gotools to d4e70101. 2015-04-05 23:28:18 +00:00

llgo
====

llgo is a Go (http://golang.org) 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).

Mailing list: https://groups.google.com/d/forum/llgo-dev

Supported platforms
-------------------

llgo is currently only supported on the x86-64 Linux platform. Contributions
that add support for other platforms are welcome.

There are two components which would need to be ported to new platforms: the
compiler and the runtime library. The compiler has little platform-specific
code; the most significant is in irgen/cabi.go. The main limiting factor
for new platforms is the runtime library in third_party/gofrontend/libgo,
which inherits some support for other platforms from the gc compiler's
runtime library, but this support tends to be incomplete.

Installation
------------

llgo requires:
* Go 1.3 or later.
* CMake 2.8.8 or later (to build LLVM).
* A modern C++ toolchain (to build LLVM).
  http://llvm.org/docs/GettingStarted.html#getting-a-modern-host-c-toolchain

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

To build and install llgo:

    # Checkout LLVM:
    svn co http://llvm.org/svn/llvm-project/llvm/trunk /path/to/llvm

    # Checkout Clang:
    cd /path/to/llvm/tools
    svn co http://llvm.org/svn/llvm-project/cfe/trunk clang

    # Checkout llgo:
    svn co http://llvm.org/svn/llvm-project/llgo/trunk llgo

    # Build LLVM, Clang and llgo: (see also http://llvm.org/docs/CMake.html)
    mkdir /path/to/llvm-build
    cd /path/to/llvm-build
    cmake /path/to/llvm -DCMAKE_INSTALL_PREFIX=/path/to/llvm-inst
    make install

Running
-------

llgo is the compiler binary. It has a command line interface that is intended
to be compatible to a large extent with gccgo. It can be used with the go
command shipped with Go 1.4 or later by setting $GCCGO to the path to the
llgo executable and supplying the "-compiler gccgo" flags to "go build".

Contributing
------------

Changes to code outside the third_party directory should be contributed in
the normal way by sending patches to <llvm-commits@cs.uiuc.edu>.

Changes to code in the third_party directory must first be made in the
respective upstream project, from which they will be mirrored into the llgo
repository. See the script update_third_party.sh for the locations of the
upstream projects and details of how the mirroring works.