...

Text file src/cmd/go/testdata/script/gccgo_link_ldflags.txt

Documentation: cmd/go/testdata/script

     1# Test that #cgo LDFLAGS are properly quoted.
     2# The #cgo LDFLAGS below should pass a string with spaces to -L,
     3# as though searching a directory with a space in its name.
     4# It should not pass --nosuchoption to the external linker.
     5
     6[!cgo] skip
     7
     8go build
     9
    10[!exec:gccgo] skip
    11
    12# TODO: remove once gccgo on builder is updated
    13[GOOS:aix] [GOARCH:ppc64] skip
    14
    15go build -compiler gccgo
    16
    17-- go.mod --
    18module m
    19-- cgo.go --
    20package main
    21// #cgo LDFLAGS: -L "./ -Wl,--nosuchoption"
    22import "C"
    23func main() {}

View as plain text