]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.cc] cmd/internal/obj: set ctxt.Windows != 0 on windows
authorRuss Cox <rsc@golang.org>
Mon, 23 Feb 2015 21:29:00 +0000 (16:29 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 23 Feb 2015 21:49:27 +0000 (21:49 +0000)
May fix windows build.

Change-Id: Ic4e32a4478caf758da6b02bc9126ddacb0fc07e0
Reviewed-on: https://go-review.googlesource.com/5650
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/internal/obj/sym.go

index d9df440f6ed0c0eca7f845078d2415c5f3e1d9d7..d22a3396ce7ec0f723964d00e060b3cd99b2f31e 100644 (file)
@@ -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 == "" {