mirror of
https://github.com/golang/go
synced 2024-11-23 14:40:02 -07:00
cmd/dist: set the default external linker on platforms without gcc
The go tool already sets -extld to the appropriate compiler. This CL changes cmd/dist to do the same, to fix bootstrapping on platforms that only have clang (Android and iOS). Updates #31722 Change-Id: I8a4fd227f85a768053a8946198eab68bbbdf9ae5 Reviewed-on: https://go-review.googlesource.com/c/go/+/174305 Run-TryBot: Elias Naur <mail@eliasnaur.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
55d690d02c
commit
d7edc91643
1
src/cmd/dist/build.go
vendored
1
src/cmd/dist/build.go
vendored
@ -666,6 +666,7 @@ func runInstall(dir string, ch chan struct{}) {
|
||||
if goldflags != "" {
|
||||
link = append(link, goldflags)
|
||||
}
|
||||
link = append(link, "-extld="+compilerEnvLookup(defaultcc, goos, goarch))
|
||||
link = append(link, "-o", pathf("%s/%s%s", tooldir, elem, exe))
|
||||
targ = len(link) - 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user