On Wed, Jun 9, 2021 at 11:27 PM Peng Deng wrote:
>
> Hi, I have the following program
>
> package main
>
> /*
> #include
>
> static void SayHello(const char* s) {
> puts(s);
> }
> */
> import "C"
>
> func main() {
> C.SayHello(C.CString("Hello, World\n"))
> }
>
> I want to compile this pr
Hello,
As described in https://go.googlesource.com/gollvm/#seetheir, you will
generally want to run "go build" in order to see the correct invocation of
llvm-goc for your use case.
In your case (building a Go file that uses CGO), there is a lot happening
"under the hood" when you do the build --
Hi, I have the following program
package main
/*
#include
static void SayHello(const char* s) {
puts(s);
}
*/
import "C"
func main() {
C.SayHello(C.CString("Hello, World\n"))
}
I want to compile this program to LLVM IR with gollvm, the compilation
instruction is as follows:
llvm-goc