blob: 4e91ae56505b63ce7dea34921ccbf3fd3bbb96d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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() {}
|