Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: permit additional cflags when compiling
In CL 475375 the Go command started to generate the "preferlinkext" token file for "strange/dangerous" compiler flags. This serves as a hint to the Go linker whether to call the external linker or not. Permit compiler flags used by bazel and bazelbuild/rules_go during compilation of cgo code to not prefer external linking. This restores the behavior of previous versions of Go. As a side effect, it also allows these flags to appear in #cgo directives in source code. We don't know of any cases where that is actually useful, but it appears to be harmless and simplifies the implementation of the internal linking change. Fixes #60865 Change-Id: I176a6a2a2cf36293dd9aed24be928f98fa2fb6d9 GitHub-Last-Rev: 071e915 GitHub-Pull-Request: #60868 Reviewed-on: https://go-review.googlesource.com/c/go/+/504335 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
- Loading branch information