From a91c2e0d2d19565da38a58bf706aec79065cefc9 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 23 Feb 2015 16:29:00 -0500 Subject: [dev.cc] cmd/internal/obj: set ctxt.Windows != 0 on windows May fix windows build. Change-Id: Ic4e32a4478caf758da6b02bc9126ddacb0fc07e0 Reviewed-on: https://go-review.googlesource.com/5650 Run-TryBot: Russ Cox Reviewed-by: Rob Pike --- src/cmd/internal/obj/sym.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cmd/internal/obj/sym.go b/src/cmd/internal/obj/sym.go index d9df440f6e..d22a3396ce 100644 --- a/src/cmd/internal/obj/sym.go +++ b/src/cmd/internal/obj/sym.go @@ -36,6 +36,7 @@ import ( "log" "os" "path/filepath" + "runtime" ) func yy_isalpha(c int) bool { @@ -131,6 +132,10 @@ func Linknew(arch *LinkArch) *Link { ctxt.Version = HistVersion ctxt.Goroot = Getgoroot() ctxt.Goroot_final = os.Getenv("GOROOT_FINAL") + if runtime.GOOS == "windows" { + // TODO(rsc): Remove ctxt.Windows and let callers use runtime.GOOS. + ctxt.Windows = 1 + } buf, _ = os.Getwd() if buf == "" { -- cgit v1.2.3-54-g00ecf