cmd/link: add more clang driver flags when testing flag
This changes does 2 things: - Move `-L` to `prefixesToKeep` since it allows providing a custom default libs search path. - Allow various flags that impact the behaviour of the clang driver. The latter allows for LLVM only toolchains to be compatible with linkerFlagSupported checks. The end goal of this PR is to allow fully hermetic toolchains, especially pure LLVM ones, to be used to cross-compile CGO. Fixes #76825 Change-Id: I2311c9566ce9c7e8f6b325258af58eb333663cf0 GitHub-Last-Rev: 74342aae35124cf174a3f8b888999ffd4cea191f GitHub-Pull-Request: golang/go#76858 Reviewed-on: https://go-review.googlesource.com/c/go/+/730561 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
C
Corentin Kerisit committed
99d7121934a9cfa7963d3a9bfd840779fd2869f6
Parent: b8bccb9
Committed by Gopher Robot <gobot@golang.org>
on 2/5/2026, 4:01:38 PM