Commit 100d64b9 authored by Russ Cox's avatar Russ Cox

cmd/go: use Go linker instead of C linker

Change-Id: I783df66d762b52ad3d74340ad5692790cd0ab544
Reviewed-on: https://go-review.googlesource.com/6360Reviewed-by: default avatarRob Pike <r@golang.org>
parent 41f5bafc
......@@ -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 {
......
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