llvm Go bindings

Use command $ go get -d llvm.org/llvm/bindings/go/llvm to get llvm project Then $ cd $GOPATH/src/llvm.org/llvm/bindings/go/llvm
$ mkdir workdir && cd workdir && mkdir llvm_build
Then go back to dir go/llvm
$ ./build.sh -DCMAKE_BUILD_TYPE=Release
I had installed Ninja, then build script use it to build system. I am not sure if you didn't install it, can compile or not.(Maybe will invoke make)

After those steps. You can create a main.go package main

import (

func main() {
    m := llvm.NewModule("hello")

Then go run the main file. You will see some LLVM IR It contains module information. Thanks for see.

Date: 2017-12-04 Mon 00:00

Author: Lîm Tsú-thuàn