aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/nm/nm.go
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2023-03-28 09:17:27 -0400
committerThan McIntosh <thanm@google.com>2024-06-13 16:35:16 +0000
commit7bfc82429c4067664d9645c70323cd76ee0496c0 (patch)
tree86f2d425e096dae627abe06958ecd0e22dec6f0d /src/cmd/nm/nm.go
parenta2026cf0d9e84346e3103f4f429107b9499eca26 (diff)
downloadgo-7bfc82429c4067664d9645c70323cd76ee0496c0.tar.xz
cmd/link: use path from "cc --print-prog-name ar" for c-archive buildmode
[This is a roll-forward of CL 479775, which had to be rolled back due to bad interactions with the wrappers used by the ios-arm64-corellium builder. ios-arm64-corellium is no longer being maintained AFAICT, meaning that it should be ok to move ahead with this patch again]. When external linking with -buildmode=c-archive, the Go linker eventually invokes the "ar" tool to create the final archive library. Prior to this patch, if the '-extar' flag was not in use, we would just run "ar". This works well in most cases but breaks down if we're doing cross-compilation targeting Windows (macos system "ar" apparently doesn't create the windows symdef section correctly). To fix the problem, capture the output of "cc --print-prog-name ar" and invoke "ar" using the path returned by that command. Fixes #59221. Change-Id: Ie367541b23641266a6f48ac68adf971501bff9fb Reviewed-on: https://go-review.googlesource.com/c/go/+/592375 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/nm/nm.go')
0 files changed, 0 insertions, 0 deletions