Commit 52ec4aa2 authored by Shenghou Ma's avatar Shenghou Ma

cmd/dist: remove stray src/pkg/runtime/z* when cleaning

R=golang-dev, bradfitz, dave, rsc, lstoakes, rsc
CC=golang-dev
https://golang.org/cl/6180044
parent 7a77645a
...@@ -1285,6 +1285,15 @@ clean(void) ...@@ -1285,6 +1285,15 @@ clean(void)
xremove(bpathf(&b, "%s/%s", bstr(&path), cleantab[i]+4)); xremove(bpathf(&b, "%s/%s", bstr(&path), cleantab[i]+4));
} }
// remove src/pkg/runtime/z* unconditionally
vreset(&dir);
bpathf(&path, "%s/src/pkg/runtime", goroot);
xreaddir(&dir, bstr(&path));
for(j=0; j<dir.len; j++) {
if(hasprefix(dir.p[j], "z"))
xremove(bpathf(&b, "%s/%s", bstr(&path), dir.p[j]));
}
if(rebuildall) { if(rebuildall) {
// Remove object tree. // Remove object tree.
xremoveall(bpathf(&b, "%s/pkg/obj/%s_%s", goroot, gohostos, gohostarch)); xremoveall(bpathf(&b, "%s/pkg/obj/%s_%s", goroot, gohostos, gohostarch));
......
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