aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-08-24 11:09:41 -0400
committerGopher Robot <gobot@golang.org>2023-08-24 17:19:11 +0000
commitfe2c686b63804b0e22295f02e4e58ddbb3da5898 (patch)
tree8a19e81be8a303e9bf0be2e4bffec3ec4afbfb9e
parentd5c5808534f0ad97333b1fd5fff81998f44986fe (diff)
downloadgo-fe2c686b63804b0e22295f02e4e58ddbb3da5898.tar.xz
test/fixedbugs: require cgo for issue10607.go
This test passes "-linkmode=external" to 'go run' to link the binary using the system C linker. CGO_ENABLED=0 explicitly tells cmd/go not to use the C toolchain, so the test should not be run in that configuration. Updates #46330. Change-Id: I16ac66aac91178045f9decaeb28134061e9711f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/522495 Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com>
-rw-r--r--test/fixedbugs/issue10607.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/fixedbugs/issue10607.go b/test/fixedbugs/issue10607.go
index 8a04bc9def..759be715b7 100644
--- a/test/fixedbugs/issue10607.go
+++ b/test/fixedbugs/issue10607.go
@@ -1,4 +1,4 @@
-// +build linux,!ppc64,gc
+// +build linux,!ppc64,gc,cgo
// run
// Copyright 2015 The Go Authors. All rights reserved.
@@ -19,7 +19,7 @@ import (
func main() {
test("internal")
- test("external")
+ test("external") // The 'cgo' build constraint should imply that a linker is available.
}
func test(linkmode string) {