diff options
| author | David Crawshaw <crawshaw@golang.org> | 2017-10-01 20:28:53 -0400 |
|---|---|---|
| committer | David Crawshaw <crawshaw@golang.org> | 2017-10-04 00:46:06 +0000 |
| commit | 273b657b4e970f510afb258aa73dc2e264a701e3 (patch) | |
| tree | 073164ae68d916ae18899f30251943eb5aa3252d /misc/cgo/testplugin/test.bash | |
| parent | 5fe9bbcf6312b32e0c9df10a5ea6ba18e929de72 (diff) | |
| download | go-273b657b4e970f510afb258aa73dc2e264a701e3.tar.xz | |
cmd/link: support -X values for main.* in plugins
Fixes #19418
Change-Id: I98205f40c1915cd68a5d20438469ba06f1efb160
Reviewed-on: https://go-review.googlesource.com/67432
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'misc/cgo/testplugin/test.bash')
| -rwxr-xr-x | misc/cgo/testplugin/test.bash | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/cgo/testplugin/test.bash b/misc/cgo/testplugin/test.bash index a52aa46037..ae3368b45f 100755 --- a/misc/cgo/testplugin/test.bash +++ b/misc/cgo/testplugin/test.bash @@ -66,3 +66,8 @@ GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" -o issue19534 src/issue19534/main. GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" -buildmode=plugin -o plugin.so src/issue18584/plugin.go GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" -o issue18584 src/issue18584/main.go ./issue18584 + +# Test for issue 19418 +GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" -buildmode=plugin "-ldflags=-X main.Val=linkstr" -o plugin.so src/issue19418/plugin.go +GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" -o issue19418 src/issue19418/main.go +./issue19418 |
