From 95ed5c3800a87ddf9b0ec3958eaaa1a969306293 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 15 Apr 2021 23:05:49 -0400 Subject: internal/buildcfg: move build configuration out of cmd/internal/objabi The go/build package needs access to this configuration, so move it into a new package available to the standard library. Change-Id: I868a94148b52350c76116451f4ad9191246adcff Reviewed-on: https://go-review.googlesource.com/c/go/+/310731 Trust: Russ Cox Run-TryBot: Russ Cox Reviewed-by: Austin Clements Reviewed-by: Jay Conrod --- src/cmd/internal/objabi/stack.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cmd/internal/objabi/stack.go') diff --git a/src/cmd/internal/objabi/stack.go b/src/cmd/internal/objabi/stack.go index 1f531176cc..0c82a7c6dd 100644 --- a/src/cmd/internal/objabi/stack.go +++ b/src/cmd/internal/objabi/stack.go @@ -4,6 +4,8 @@ package objabi +import "internal/buildcfg" + // For the linkers. Must match Go definitions. const ( @@ -22,7 +24,7 @@ var StackLimit = StackGuard - StackSystem - StackSmall // builds that have larger stack frames or for specific targets. func stackGuardMultiplier() int { // On AIX, a larger stack is needed for syscalls. - if GOOS == "aix" { + if buildcfg.GOOS == "aix" { return 2 } return stackGuardMultiplierDefault -- cgit v1.3