1
0
mirror of https://github.com/golang/go synced 2024-11-24 01:00:15 -07:00

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: Than McIntosh <thanm@google.com>
This commit is contained in:
Cherry Zhang 2019-11-04 16:19:29 -05:00
parent d80ab3e85a
commit d9ee4b2859

View File

@ -76,14 +76,9 @@ func TestUndefinedRelocErrors(t *testing.T) {
const carchiveSrcText = `
package main
// int fortytwo;
import "C"
var v int
//export GoFunc
func GoFunc() {
v = int(C.fortytwo)
println(42)
}
func main() {