]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: remove never-set Windows variable
authorDavid Crawshaw <crawshaw@golang.org>
Fri, 16 Sep 2016 19:24:56 +0000 (15:24 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Fri, 16 Sep 2016 21:11:57 +0000 (21:11 +0000)
Change-Id: I3d64549b85b71bb63bcc815ce2276af6ca2eb215
Reviewed-on: https://go-review.googlesource.com/29354
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/link/internal/ld/ld.go
src/cmd/link/internal/ld/link.go

index aa08cbdbcbfb630e6549f0e3e13dc608414c0811..eefc0e9b8027bec26d9dbab04c8dc12be5b9fb30 100644 (file)
@@ -36,6 +36,7 @@ import (
        "io/ioutil"
        "os"
        "path"
+       "path/filepath"
        "strconv"
        "strings"
 )
@@ -58,7 +59,7 @@ func addlib(ctxt *Link, src string, obj string, pathname string) {
 
        var pname string
        isshlib := false
-       if (ctxt.Windows == 0 && strings.HasPrefix(name, "/")) || (ctxt.Windows != 0 && len(name) >= 2 && name[1] == ':') {
+       if filepath.IsAbs(name) {
                pname = name
        } else {
                // try dot, -L "libdir", and then goroot.
index 77d3b38a677510b8856ecef6c8e742eb5c12eeda..480c6e36c5972b0e82e286e5be357e78556ee758 100644 (file)
@@ -176,7 +176,6 @@ type Link struct {
        Arch      *sys.Arch
        Debugvlog int
        Bso       *bufio.Writer
-       Windows   int32
 
        Loaded bool // set after all inputs have been loaded as symbols