Skip to content

krasin/gollvm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLVM bindings for the Go programming language

Most of the stuff is ported. API is primitive, it doesn't use Go's type system
extensively to provide safety. I think it's possible to mimic LLVM C++ API type
hierarchy quite closely using Go's methods and type embedding. But I haven't
done that, because doing that requires a lot of usability testing. If anyone is
interested in using Go LLVM bindings for a very big and serious project, let me
know. In that case we can work more closely on improving the bindings API.

P.S. Most notable things that are still missing are BitReader and BitWriter,
I'll implement them soon.

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 goinstall 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` `llvm-config --libs interpreter all-targets bitwriter ipo engine`"
    $ go get github.com/axw/gollvm/llvm

About

LLVM bindings for the Go programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.8%
  • Shell 0.2%