]> Cypherpunks repositories - gostls13.git/commit
cmd/link: return correct default linker for the platform
authorDmitri Goutnik <dgoutnik@gmail.com>
Thu, 22 Sep 2022 11:59:42 +0000 (06:59 -0500)
committerDmitri Goutnik <dgoutnik@gmail.com>
Fri, 14 Oct 2022 17:45:21 +0000 (17:45 +0000)
commit15e26698cc206661063c07cf7f0353391604001e
tree5a8c9af40f3cd19cd84cb4a5fbe1c0acf5506b82
parent8826bdd143314895230776e582043d34ea635a33
cmd/link: return correct default linker for the platform

If no external linker was passed with -extld, link currently assumes
that it is "gcc" which is not correct for platforms that use clang
toolchain. Return "clang" for platforms that use it, this fixes dir
tests on freebsd/riscv64.

For #53466

Change-Id: Ie3bce1b9581839d0b3b2129908355cd30ae9a713
Reviewed-on: https://go-review.googlesource.com/c/go/+/432756
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Mikaƫl Urankar <mikael.urankar@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
src/cmd/link/internal/ld/lib.go