mirror of
https://github.com/golang/go
synced 2024-11-26 19:51:17 -07:00
cmd/compile,cmd/dist,cmd/go: enable pie buildmode for linux/riscv64
Enable pie as a buildmode for linux/riscv64, along with associated tests. Change-Id: I3fb0234d534dbeb96aa6cee6ae872304fbe02cf4 Reviewed-on: https://go-review.googlesource.com/c/go/+/267317 Trust: Joel Sing <joel@sing.id.au> Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
e1b305af02
commit
8eb846fd37
@ -130,7 +130,7 @@ func hidePanic() {
|
||||
// supportsDynlink reports whether or not the code generator for the given
|
||||
// architecture supports the -shared and -dynlink flags.
|
||||
func supportsDynlink(arch *sys.Arch) bool {
|
||||
return arch.InFamily(sys.AMD64, sys.ARM, sys.ARM64, sys.I386, sys.PPC64, sys.S390X)
|
||||
return arch.InFamily(sys.AMD64, sys.ARM, sys.ARM64, sys.I386, sys.PPC64, sys.RISCV64, sys.S390X)
|
||||
}
|
||||
|
||||
// timing data for compiler phases
|
||||
|
2
src/cmd/dist/test.go
vendored
2
src/cmd/dist/test.go
vendored
@ -1021,7 +1021,7 @@ func (t *tester) supportedBuildmode(mode string) bool {
|
||||
case "pie":
|
||||
switch pair {
|
||||
case "aix/ppc64",
|
||||
"linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-ppc64le", "linux-s390x",
|
||||
"linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-ppc64le", "linux-riscv64", "linux-s390x",
|
||||
"android-amd64", "android-arm", "android-arm64", "android-386":
|
||||
return true
|
||||
case "darwin-amd64", "darwin-arm64":
|
||||
|
@ -2022,7 +2022,7 @@ func TestBuildmodePIE(t *testing.T) {
|
||||
|
||||
platform := fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)
|
||||
switch platform {
|
||||
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x",
|
||||
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/riscv64", "linux/s390x",
|
||||
"android/amd64", "android/arm", "android/arm64", "android/386",
|
||||
"freebsd/amd64",
|
||||
"windows/386", "windows/amd64", "windows/arm":
|
||||
|
@ -86,7 +86,7 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool {
|
||||
|
||||
case "pie":
|
||||
switch platform {
|
||||
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/s390x",
|
||||
case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le", "linux/riscv64", "linux/s390x",
|
||||
"android/amd64", "android/arm", "android/arm64", "android/386",
|
||||
"freebsd/amd64",
|
||||
"darwin/amd64", "darwin/arm64",
|
||||
|
Loading…
Reference in New Issue
Block a user