From f7670b9f9471d0d40666c28faaaa67851eb8ec2e Mon Sep 17 00:00:00 2001 From: Than McIntosh Date: Tue, 8 Feb 2022 11:56:10 -0500 Subject: [PATCH] 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 Trust: Than McIntosh Run-TryBot: Than McIntosh TryBot-Result: Gopher Robot --- src/cmd/go/go_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index fa0d44dae6..426228a831 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -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() }`) -- 2.48.1