Commit f323a7c6 authored by David Crawshaw's avatar David Crawshaw

cmd/link: remove never-set Windows variable

Change-Id: I3d64549b85b71bb63bcc815ce2276af6ca2eb215
Reviewed-on: https://go-review.googlesource.com/29354Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent d6194c1f
...@@ -36,6 +36,7 @@ import ( ...@@ -36,6 +36,7 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"path" "path"
"path/filepath"
"strconv" "strconv"
"strings" "strings"
) )
...@@ -58,7 +59,7 @@ func addlib(ctxt *Link, src string, obj string, pathname string) { ...@@ -58,7 +59,7 @@ func addlib(ctxt *Link, src string, obj string, pathname string) {
var pname string var pname string
isshlib := false isshlib := false
if (ctxt.Windows == 0 && strings.HasPrefix(name, "/")) || (ctxt.Windows != 0 && len(name) >= 2 && name[1] == ':') { if filepath.IsAbs(name) {
pname = name pname = name
} else { } else {
// try dot, -L "libdir", and then goroot. // try dot, -L "libdir", and then goroot.
......
...@@ -176,7 +176,6 @@ type Link struct { ...@@ -176,7 +176,6 @@ type Link struct {
Arch *sys.Arch Arch *sys.Arch
Debugvlog int Debugvlog int
Bso *bufio.Writer Bso *bufio.Writer
Windows int32
Loaded bool // set after all inputs have been loaded as symbols Loaded bool // set after all inputs have been loaded as symbols
......
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