Commit ae3e3610 authored by Michael Hudson-Doyle's avatar Michael Hudson-Doyle Committed by Ian Lance Taylor

cmd/go: change Package.Shlib to be the absolute path of the shared library

Makes little difference internally but makes go list output more useful.

Change-Id: I1fa1f839107de08818427382b2aef8dc4d765b36
Reviewed-on: https://go-review.googlesource.com/10192Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
parent 7eec656b
......@@ -782,8 +782,8 @@ func (b *builder) action1(mode buildMode, depMode buildMode, p *Package, looksha
b.actionCache[key] = a
return a
}
pkgs := readpkglist(filepath.Join(p.build.PkgTargetRoot, shlib))
a = b.libaction(shlib, pkgs, modeInstall, depMode)
pkgs := readpkglist(shlib)
a = b.libaction(filepath.Base(shlib), pkgs, modeInstall, depMode)
b.actionCache[key2] = a
b.actionCache[key] = a
return a
......
......@@ -536,7 +536,8 @@ func (p *Package) load(stk *importStack, bp *build.Package, err error) *Package
shlibnamefile := p.target[:len(p.target)-2] + ".shlibname"
shlib, err := ioutil.ReadFile(shlibnamefile)
if err == nil {
p.Shlib = strings.TrimSpace(string(shlib))
libname := strings.TrimSpace(string(shlib))
p.Shlib = filepath.Join(p.build.PkgTargetRoot, libname)
} else if !os.IsNotExist(err) {
fatalf("unexpected error reading %s: %v", shlibnamefile, err)
}
......
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