summaryrefslogtreecommitdiff
path: root/src/cmd/dist/build.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/dist/build.c')
-rw-r--r--src/cmd/dist/build.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c
index a40853fad..3936f7621 100644
--- a/src/cmd/dist/build.c
+++ b/src/cmd/dist/build.c
@@ -209,7 +209,7 @@ findgoversion(void)
// What are the tags along the current branch?
tag = "";
rev = ".";
- run(&b, goroot, CheckExit, "hg", "log", "-b", bstr(&branch), "--template", "{tags} + ", nil);
+ run(&b, goroot, CheckExit, "hg", "log", "-b", bstr(&branch), "-r", ".:0", "--template", "{tags} + ", nil);
splitfields(&tags, bstr(&b));
nrev = 0;
for(i=0; i<tags.len; i++) {
@@ -1214,6 +1214,8 @@ clean(void)
vinit(&dir);
for(i=0; i<nelem(cleantab); i++) {
+ if((streq(cleantab[i], "cmd/cov") || streq(cleantab[i], "cmd/prof")) && !isdir(cleantab[i]))
+ continue;
bpathf(&path, "%s/src/%s", goroot, cleantab[i]);
xreaddir(&dir, bstr(&path));
// Remove generated files.
@@ -1351,6 +1353,9 @@ cmdbootstrap(int argc, char **argv)
goversion = findgoversion();
setup();
+ xsetenv("GOROOT", goroot);
+ xsetenv("GOROOT_FINAL", goroot_final);
+
// For the main bootstrap, building for host os/arch.
oldgoos = goos;
oldgoarch = goarch;