1
0
mirror of https://github.com/golang/go synced 2024-09-29 11:24:28 -06:00

cmd/go: update TestCgoHandlesWlORIGIN to avoid -rpath on windows

Tweak the cgo recipe for the TestCgoHandlesWlORIGIN testpoint to avoid
using "-rpath" on Windows, where it doesn't make sense to use it. This
change needed to avoid an "unknown flag -rpath" from clang/ldd on
windows.

Updates #35006.

Change-Id: I4fcd649df4687aa3aff5690e11a15fc0e0f42332
Reviewed-on: https://go-review.googlesource.com/c/go/+/384155
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Than McIntosh 2022-02-08 11:56:10 -05:00
parent 96081f8545
commit f7670b9f94

View File

@ -1567,7 +1567,7 @@ func TestCgoHandlesWlORIGIN(t *testing.T) {
defer tg.cleanup()
tg.parallel()
tg.tempFile("src/origin/origin.go", `package origin
// #cgo !darwin LDFLAGS: -Wl,-rpath,$ORIGIN
// #cgo !darwin,!windows LDFLAGS: -Wl,-rpath,$ORIGIN
// void f(void) {}
import "C"
func f() { C.f() }`)