Commit d9ee4b28 authored by Cherry Zhang's avatar Cherry Zhang

cmd/link/internal/ld: fix TestArchiveBuildInvokeWithExec

TestArchiveBuildInvokeWithExec is failing on darwin due to
duplicated symbols, because the C definition (int fortytwo;) is
copied to two generated cgo sources. In fact, this test is about
building c-archive, but doesn't need to import "C". Removed the
"C" import.

Change-Id: I3a17546e01272a7ae37e6417791ab949fb44597e
Reviewed-on: https://go-review.googlesource.com/c/go/+/205278
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: default avatarThan McIntosh <thanm@google.com>
parent d80ab3e8
...@@ -76,14 +76,9 @@ func TestUndefinedRelocErrors(t *testing.T) { ...@@ -76,14 +76,9 @@ func TestUndefinedRelocErrors(t *testing.T) {
const carchiveSrcText = ` const carchiveSrcText = `
package main package main
// int fortytwo;
import "C"
var v int
//export GoFunc //export GoFunc
func GoFunc() { func GoFunc() {
v = int(C.fortytwo) println(42)
} }
func main() { func main() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment