Skip to content

cmd/go: invalidate cached binaries when statically-linked external libraries changeΒ #29843

@haohui

Description

@haohui

What version of Go are you using (go version)?

go 1.11.4

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

amd64

What did you do?

We have a number of C libraries that need to be linked externally. We did it by manually passing CGO_LDFLAGS in the build process. Whenever we change the library, go cache does not detect the changes and thus the binary is not always relinked.

Turning GOCACHE off and deleting the binary will solve the problem. As go 1.12 will require the cache to be turned on, the workaround will no long work. What would be the best way to go forward?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions