diff options
| author | Pedro Tôrres <t0rr3sp3dr0@gmail.com> | 2024-12-27 07:21:53 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-12-27 12:34:09 -0800 |
| commit | e3cd55e9d293d519e622e788e902f372dc30338a (patch) | |
| tree | 4312ec94abe0b73a2c75913075c50d610645e07b /src/encoding/json/decode_test.go | |
| parent | 39794819aa0950f143fa59c41b577bf6a2f81455 (diff) | |
| download | go-e3cd55e9d293d519e622e788e902f372dc30338a.tar.xz | |
cmd/go/internal/work: allow @ character in some -Wl, linker flags on darwin
The GNU linker interprets @file as "read command-line options from file".
Thus, we forbid values starting with @ on linker flags. However, this
causes a problem when targeting Darwin. @executable_path, @loader_path, and
@rpath are special values used in Mach-O to change the library search path
and can be used in conjunction with the -install_name and -rpath linker
flags. Since the GNU linker does not support Mach-O, targeting Darwin
implies not using the GNU linker. Therefore, we allow @ in the linker flags
if and only if cfg.Goos == "darwin".
Fixes #40559
Change-Id: I0896758f0835e444ea0d501ea3fd8423cff97a27
GitHub-Last-Rev: 2b81dcd12e7ae0bbb77deccc9973f84a3aa6d750
GitHub-Pull-Request: golang/go#70939
Reviewed-on: https://go-review.googlesource.com/c/go/+/638075
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/encoding/json/decode_test.go')
0 files changed, 0 insertions, 0 deletions
