Commit a91c2e0d authored by Russ Cox's avatar Russ Cox

[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 <rsc@golang.org>
Reviewed-by: default avatarRob Pike <r@golang.org>
parent 382b44eb
...@@ -36,6 +36,7 @@ import ( ...@@ -36,6 +36,7 @@ import (
"log" "log"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
) )
func yy_isalpha(c int) bool { func yy_isalpha(c int) bool {
...@@ -131,6 +132,10 @@ func Linknew(arch *LinkArch) *Link { ...@@ -131,6 +132,10 @@ func Linknew(arch *LinkArch) *Link {
ctxt.Version = HistVersion ctxt.Version = HistVersion
ctxt.Goroot = Getgoroot() ctxt.Goroot = Getgoroot()
ctxt.Goroot_final = os.Getenv("GOROOT_FINAL") 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() buf, _ = os.Getwd()
if buf == "" { if buf == "" {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment