If you run `go install github.com/mattn/go-sqlite3/...` it'll cache that build step artifact.
John Weldon m) 503-941-0825 On Wed, Jun 15, 2016 at 3:42 PM, Alex Flint <alex.fl...@gmail.com> wrote: > Hmm but I am also not changing the Go source of the package in question, > yet the C sources seem to get recompiled. > > Just to make sure we're on the same page, I have two packages: mypkg and > go-sqlite3, where the former is pure Go and the depends on the latter, > which contains both C and Go code. Whenever I make changes to Go sources in > mypkg I can see that the cgo compiler is being run on go-sqlite3. > > On Wed, Jun 15, 2016 at 3:23 PM Ian Lance Taylor <i...@golang.org> wrote: > >> On Wed, Jun 15, 2016 at 2:54 PM, Alex Flint <alex.fl...@gmail.com> wrote: >> > Under what conditions does a cgo package get recompiled? I am using >> > go-sqlite3 and it appears that the C compiler/linker is run every time I >> > build my project, even though I am not changing any of the C sources. I >> > would have expected it to be run once and then the results re-used, but >> > perhaps there are some special rules for cgo recompilation? >> >> Currently the go tool either compiles an entire package or doesn't >> compile it at all. If it is a cgo package with .c files, it compiles >> those .c files every time it thinks any part of the package needs to >> be recompiled--e.g., if you changed the Go code. >> >> I thought there was an issue open about that, but I couldn't find it. >> >> 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. > -- 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.