]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: update TestCgoHandlesWlORIGIN to avoid -rpath on windows
authorThan McIntosh <thanm@google.com>
Tue, 8 Feb 2022 16:56:10 +0000 (11:56 -0500)
committerThan McIntosh <thanm@google.com>
Thu, 31 Mar 2022 19:40:16 +0000 (19:40 +0000)
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>

src/cmd/go/go_test.go

index fa0d44dae60ddc6dcaf81889f25f82b90354b8ea..426228a831f5ace48c3e79dad407f7024b41c91c 100644 (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() }`)