1
0
mirror of https://github.com/golang/go synced 2024-11-19 10:14:44 -07:00

cmd/go: use Go linker instead of C linker

Change-Id: I783df66d762b52ad3d74340ad5692790cd0ab544
Reviewed-on: https://go-review.googlesource.com/6360
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Russ Cox 2015-02-27 22:56:29 -05:00
parent 41f5bafc51
commit 100d64b920

View File

@ -1744,6 +1744,7 @@ func toolVerify(b *builder, p *Package, newTool string, ofile string, args []int
if !bytes.Equal(data1, data2) {
return fmt.Errorf("%s and %s produced different output files:\n%s\n%s", filepath.Base(args[1].(string)), newTool, strings.Join(stringList(args...), " "), strings.Join(stringList(newArgs...), " "))
}
os.Remove(ofile + ".new")
return nil
}
@ -1891,7 +1892,7 @@ func (gcToolchain) ld(b *builder, p *Package, out string, allactions []*action,
}
}
ldflags = append(ldflags, buildLdflags...)
return b.run(".", p.ImportPath, nil, stringList(buildToolExec, tool(archChar+"l"), "-o", out, importArgs, ldflags, mainpkg))
return b.run(".", p.ImportPath, nil, buildToolExec, tool("new"+archChar+"l"), "-o", out, importArgs, ldflags, mainpkg)
}
func (gcToolchain) cc(b *builder, p *Package, objdir, ofile, cfile string) error {