-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 2b81dcd GitHub-Pull-Request: #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>
- Loading branch information
1 parent
3979481
commit e3cd55e
Showing
2 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters