On Sun, Oct 28, 2018 at 1:20 PM, jclc via golang-nuts
<golang-nuts@googlegroups.com> wrote:
>
> There is an initiative to remove the requirement of having a C compiler for
> certain CGO packages and this seems like a somewhat common thing to do, even
> the Go race condition detector ships as a pre-built C blob in the Go source
> tree. Yet I can't find any documentation on how to actually do this.
>
> How should .syso files be built? Where should the C code live (Go complains
> if C source files exist in the package directory)? How does the Go linker
> find the correct symbols? Is there any concrete documentation or a tutorial
> on how to do this?

There are no guidelines for how to build .syso files, and the C code
can live anywhere.  The .syso file will be built by some mechanism
other than the go tool, such as make.  The .syso file can be copied
into the Go package.  It will be linked into the Go program.  A
typical use would involve using cgo (https://golang.org/cmd/cgo) to
call into the .syso.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to