The cmd/dist binary imports the elf package (and thus the dwarf) binary, just for one use:
case strings.Contains(out, "mips64"):
file, err := elf.Open(os.Args[0])
if err != nil {
fatal("failed to open %s to determine endianness: %v", os.Args[0], err)
}
if file.FileHeader.ByteOrder == binary.BigEndian {
gohostarch = "mips64"
} else {
gohostarch = "mips64le"
}
... for detecting the host architecture.
Can that be done cheaper?
(noticed while looking at reducing the GOROOT_BOOTSTRAP tarball size sent to builders)
Not super high priority, of course.
The cmd/dist binary imports the
elfpackage (and thus thedwarf) binary, just for one use:... for detecting the host architecture.
Can that be done cheaper?
(noticed while looking at reducing the GOROOT_BOOTSTRAP tarball size sent to builders)
Not super high priority, of course.