3 ms·
"At the moment llvm-goparse is not capable of building the Go libraries + runtime (libgo), which makes it difficult/unwieldy to use for running actual Go progra
by akavel 9y ago
"At the moment llvm-goparse is not capable of building the Go libraries + runtime (libgo), which makes it difficult/unwieldy to use for running actual Go programs. As an interim workaround, I've written a shim/wrapper script that allows you to use llvm-goparse in combination with an existing GCCGO installation, using gccgo for the runtime/libraries and the linking step, but llvm-goparse for any compilation."
Not sure I get it: so Gollvm (=llvm-goparse?) can be used as compiler, but not as a linker (yet?), so gccgo's linker can be used? Also, Go runtime and standard libraries can't be compiled with Gollvm? If standard libs can't be compiled, then how can I know if my app can be compiled?
I know a project named "llvm-go" was started quite long ago, and had somewhat slow (compared to gccgo) progress because of few, non-Google contributors (probably hobbyists); is this the same work? is it just still in progress, but somewhat more (how much?) advanced now?
Some additional googling shows a similarly named project (https://github.com/go-llvm/llvm https://github.com/go-llvm/llvm), which from its readme seems absorbed by LLVM proper, and is subtitled "LLVM bindings for [Go]" (http://llvm.org/svn/llvm-project/llvm/trunk/bindings/go/README.txt http://llvm.org/svn/llvm-project/llvm/trunk/bindings/go/READ...). Is this the same project, or something more, or something else? [EDIT:] Ok, based on the CONTRIBUTORS file, it's a totally different project, at least one question cleared. (https://go.googlesource.com/gollvm/+/master/CONTRIBUTORS https://go.googlesource.com/gollvm/+/master/CONTRIBUTORS)
- mseepgood 9y ago> Is this the same project, or something more, or something else? Compare the source code: http://llvm.org/svn/llvm-project/llvm/trunk/bindings/go/llvm/ http://llvm.org/svn/llvm-project/llvm/trunk/bindings/go/llvm... https://go.googlesource.com/gollvm/+/master/llvm-gofrontend/ https://go.googlesource.com/gollvm/+/master/llvm-gofrontend/
- geofft 9y agogo-llvm/llvm appears to be a set of Go bindings to LLVM, i.e., the ability to access libllvm (embed LLVM and use it programatically) from a normal Go program. That is, you're using Go to drive LLVM, not LLVM to compile Go. See the factorial example, where they build up some LLVM IR (in memory) for computing factorials: https://github.com/go-llvm/llvm/blob/master/examples/factorial/factorial.go https://github.com/go-llvm/llvm/blob/master/examples/factori... I'd guess the advantage of this is using LLVM's JIT at runtime.
- zik 9y agoI think you're thinking of llgo, not go-llvm.