]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test/fixedbugs: require cgo for issue10607.go
authorBryan C. Mills <bcmills@google.com>
Thu, 24 Aug 2023 15:09:41 +0000 (11:09 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 24 Aug 2023 17:19:11 +0000 (17:19 +0000)
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>

test/fixedbugs/issue10607.go

index 8a04bc9def70341734ac4b7ba2c71f9ceed027e9..759be715b7dada637df191f22c34a0259f9dda64 100644 (file)
@@ -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) {