diff options
Diffstat (limited to 'src/cmd/go/testdata/script/gccgo_link_ldflags.txt')
-rw-r--r-- | src/cmd/go/testdata/script/gccgo_link_ldflags.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/go/testdata/script/gccgo_link_ldflags.txt b/src/cmd/go/testdata/script/gccgo_link_ldflags.txt new file mode 100644 index 00000000000..4e91ae56505 --- /dev/null +++ b/src/cmd/go/testdata/script/gccgo_link_ldflags.txt @@ -0,0 +1,20 @@ +# Test that #cgo LDFLAGS are properly quoted. +# The #cgo LDFLAGS below should pass a string with spaces to -L, +# as though searching a directory with a space in its name. +# It should not pass --nosuchoption to the external linker. + +[!cgo] skip + +go build + +[!exec:gccgo] skip + +go build -compiler gccgo + +-- go.mod -- +module m +-- cgo.go -- +package main +// #cgo LDFLAGS: -L "./ -Wl,--nosuchoption" +import "C" +func main() {} |