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

     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  
     8  go build
     9  
    10  [!exec:gccgo] skip
    11  
    12  # TODO: remove once gccgo on builder is updated
    13  [GOOS:aix] [GOARCH:ppc64] skip
    14  
    15  go build -compiler gccgo
    16  
    17  -- go.mod --
    18  module m
    19  -- cgo.go --
    20  package main
    21  // #cgo LDFLAGS: -L "./ -Wl,--nosuchoption"
    22  import "C"
    23  func main() {}
    24  

View as plain text