/ go Public
cmd/go: optimize CGO caching and dead code removal #38886
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
I'm writing this with the assumption that each CGO-generated wrapper for each C function is stored in its own C file.
Editing and compiling a CGO package can take a minute or 2, even for one little change.
It should be possible to cache the generated .o files and only recompile them if the code for that function changes.
When linking the CGO wrappers, Go should avoid linking unused wrappers to reduce size.
The text was updated successfully, but these errors were encountered: