How to compile go progran using dragongg?

Hello, everyone.
I’m trying to compile go language program to llvm ir, and I using the gcc+dragonegg , like this:
$gcc test.go -S -O1 -o - -fplugin=path_to_dragonegg/dragegg.so -flto

but there is a error occur: gcc: error trying to exec ‘go1’: execvp: no such file or directory.
Is there anyone can help me? Thx a lot!

–Wang Lei (BUPT)

Hi Lei,

I can’t give any advice on dragonegg (maybe you should be using the “gccgo” command instead of “gcc”?), but in case you’re not aware there is a Go frontend for LLVM called llgo: http://llvm.org/klaus/llgo/blob/master/README.TXT.

Cheers,
Andrew

Hi Wang Lei,