diff options
author | Than McIntosh <thanm@google.com> | 2019-11-08 16:11:44 -0500 |
---|---|---|
committer | Than McIntosh <thanm@google.com> | 2019-11-11 17:44:21 +0000 |
commit | 275a7be3da9fded6ec71c92633bca30caf6dd93b (patch) | |
tree | a7ea222fbf0f18f59cb2669be132e16452993f4e /misc | |
parent | 795e8c2317a6a4d728a59caa7550312cdceab367 (diff) | |
download | go-275a7be3da9fded6ec71c92633bca30caf6dd93b.tar.gz go-275a7be3da9fded6ec71c92633bca30caf6dd93b.zip |
cmd/go: remove -w workaround for -buildmode=plugin on Darwin
The problem causing the assert in #21647 are fixed at this point,
along with various other linker issues with plugin + Darwin. With
this in mind, remove the "-ldflags=-w" workaround for plugin mode on
Darwin and re-enable the appropriate tests misc/cgo/testplugin
Fixes #21647.
Fixes #27502.
Change-Id: I5b662987b138b06cfc9e1f9f6d804cf682bd501a
Reviewed-on: https://go-review.googlesource.com/c/go/+/206198
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cgo/testplugin/plugin_test.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/misc/cgo/testplugin/plugin_test.go b/misc/cgo/testplugin/plugin_test.go index 7e2b6eb04c0..bf7abcbd698 100644 --- a/misc/cgo/testplugin/plugin_test.go +++ b/misc/cgo/testplugin/plugin_test.go @@ -14,7 +14,6 @@ import ( "os" "os/exec" "path/filepath" - "runtime" "strings" "testing" "time" @@ -114,11 +113,7 @@ func run(t *testing.T, bin string, args ...string) string { func TestDWARFSections(t *testing.T) { // test that DWARF sections are emitted for plugins and programs importing "plugin" - if runtime.GOOS != "darwin" { - // On macOS, for some reason, the linker doesn't add debug sections to .so, - // see issue #27502. - goCmd(t, "run", "./checkdwarf/main.go", "plugin2.so", "plugin2.UnexportedNameReuse") - } + goCmd(t, "run", "./checkdwarf/main.go", "plugin2.so", "plugin2.UnexportedNameReuse") goCmd(t, "run", "./checkdwarf/main.go", "./host.exe", "main.main") } |