mirror of
https://github.com/golang/go
synced 2024-11-21 23:34:42 -07:00
cmd/dist: exclude cov and prof from releases
Also check for old and exp. Fixes #2764. Fixes #2765. R=golang-dev, r CC=golang-dev https://golang.org/cl/5654068
This commit is contained in:
parent
dcf5ca706b
commit
82568c5cd5
40
src/cmd/dist/build.c
vendored
40
src/cmd/dist/build.c
vendored
@ -283,6 +283,15 @@ static char *oldtool[] = {
|
||||
"quietgcc",
|
||||
};
|
||||
|
||||
// Unreleased directories (relative to $GOROOT) that should
|
||||
// not be in release branches.
|
||||
static char *unreleased[] = {
|
||||
"src/cmd/cov",
|
||||
"src/cmd/prof",
|
||||
"src/pkg/old",
|
||||
"src/pkg/exp",
|
||||
};
|
||||
|
||||
// setup sets up the tree for the initial build.
|
||||
static void
|
||||
setup(void)
|
||||
@ -347,6 +356,13 @@ setup(void)
|
||||
}
|
||||
}
|
||||
|
||||
// For release, make sure excluded things are excluded.
|
||||
if(hasprefix(goversion, "release.") || hasprefix(goversion, "go.")) {
|
||||
for(i=0; i<nelem(unreleased); i++)
|
||||
if(isdir(bpathf(&b, "%s/%s", goroot, unreleased[i])))
|
||||
fatal("%s should not exist in release build", bstr(&b));
|
||||
}
|
||||
|
||||
bfree(&b);
|
||||
}
|
||||
|
||||
@ -539,6 +555,24 @@ install(char *dir)
|
||||
vinit(&lib);
|
||||
vinit(&extra);
|
||||
|
||||
// path = full path to dir.
|
||||
bpathf(&path, "%s/src/%s", goroot, dir);
|
||||
name = lastelem(dir);
|
||||
|
||||
// For misc/prof, copy into the tool directory and we're done.
|
||||
if(hasprefix(dir, "misc/")) {
|
||||
copy(bpathf(&b, "%s/%s", tooldir, name),
|
||||
bpathf(&b1, "%s/misc/%s", goroot, name));
|
||||
goto out;
|
||||
}
|
||||
|
||||
// For release, cmd/prof and cmd/cov are not included.
|
||||
if((streq(dir, "cmd/cov") || streq(dir, "cmd/prof")) && !isdir(bstr(&path))) {
|
||||
if(vflag > 1)
|
||||
xprintf("skipping %s - does not exist\n", dir);
|
||||
goto out;
|
||||
}
|
||||
|
||||
// set up gcc command line on first run.
|
||||
if(gccargs.len == 0) {
|
||||
xgetenv(&b, "CC");
|
||||
@ -549,10 +583,6 @@ install(char *dir)
|
||||
vadd(&gccargs, proto_gccargs[i]);
|
||||
}
|
||||
|
||||
// path = full path to dir.
|
||||
bpathf(&path, "%s/src/%s", goroot, dir);
|
||||
name = lastelem(dir);
|
||||
|
||||
islib = hasprefix(dir, "lib") || streq(dir, "cmd/cc") || streq(dir, "cmd/gc");
|
||||
ispkg = hasprefix(dir, "pkg");
|
||||
isgo = ispkg || streq(dir, "cmd/go") || streq(dir, "cmd/cgo");
|
||||
@ -1030,6 +1060,8 @@ static char *buildorder[] = {
|
||||
"lib9",
|
||||
"libbio",
|
||||
"libmach",
|
||||
|
||||
"misc/pprof",
|
||||
|
||||
"cmd/cov",
|
||||
"cmd/nm",
|
||||
|
Loading…
Reference in New Issue
Block a user