cmd/go: go1.27.4 rejects Rust static libraries in #cgo LDFLAGS [1.26 backport] · Issue #83135 · golang/go · GitHub
Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert cmd/go: go1.27.4 rejects Rust static libraries in #cgo LDFLAGS [1.26 backport] #83135 New issue Copy link New issue Copy link Open Open cmd/go: go1.27.4 rejects Rust static libraries in #cgo LDFLAGS [1.26 backport] #83135 Copy link Labels CherryPickCandidate Used during the release process for point releases Used during the release process for point releases Milestone Go1.26.12 Description gopherbot opened on Nov 16, 2026 Issue body actions @rolandshoemaker requested issue #83126 to be considered for backport to the next 1.26 minor release.
Sorry, I think this was an oversight in the fix that addressed the gcc linker driver handling of LTO sections (which allowed arbitrary flags to be specified in .gnu.lto_.opts sections) and macOS LLVM bitcode wrapper file handling, which allowed smuggling of -lto_library arguments. This seems to be a clear regression. Based on my follow-up analysis, .llvmbc, .llvmcmd, and __LLVM,__bitcode should be entirely safe. I'll push a fix for this, as well as honoring the CGO_LDFLAGS_ALLOW/CGO_CFLAGS_ALLOW bypasses.
Since this is a clear regression with no reasonable workaround we should backport the fix. @gopherbot please open backport issues. Reacted by Jorge Oliveira Activity gopherbot added CherryPickCandidate Used during the release process for point releases Used during the release process for point releases on Nov 16, 2026 gopherbot added this to the Go1.26.12 milestone on Nov 16, 2026 gopherbot commented on Nov 18, 2026 gopherbot on Nov 18, 2026 Contributor Author More actions Change https://go.dev/cl/865044 mentions this issue: [release-branch.go1.26] cmd/go/internal/work: allow embedded LLVM bitcode sections and honor CGO_LDFLAGS_ALLOW Sign up for free to join this conversation on GitHub.
Already have an account? Sign in to comment Metadata Metadata Assignees No one assigned Labels CherryPickCandidate Used during the release process for point releases Used during the release process for point releases Type No type Projects No projects Milestone Go1.26.12 No due date Relationships None yet Development No branches or pull requests Issue actions You can’t perform that action at this time.