Commit 8db677b0 authored by Russ Cox's avatar Russ Cox

delete heuristic left over from incremental compilation

R=r
DELTA=31  (2 added, 28 deleted, 1 changed)
OCL=33064
CL=33112
parent b5c57fea
......@@ -692,23 +692,10 @@ addlib(char *src, char *obj)
snprint(pname, sizeof pname, "%s/pkg/%s_%s/%s", goroot, goos, goarch, name);
strcpy(name, pname);
}
cleanname(name);
if(debug['v'])
Bprint(&bso, "%5.2f addlib: %s %s pulls in %s\n", cputime(), obj, src, name);
p = strrchr(src, '/');
q = strrchr(name, '/');
if(p != nil && q != nil && p - src == q - name && memcmp(src, name, p - src) == 0) {
// leading paths are the same.
// if the source file refers to an object in its own directory
// and we are inside an archive, ignore the reference, in the hope
// that the archive contains that object too.
if(strchr(obj, '(')) {
if(debug['v'])
Bprint(&bso, "%5.2f ignored srcdir object %s\n", cputime(), name);
return;
}
}
for(i=0; i<libraryp; i++)
if(strcmp(name, library[i]) == 0)
return;
......
......@@ -600,7 +600,7 @@ zaddr(Biobuf *f, Adr *a, Sym *h[])
void
addlib(char *src, char *obj)
{
char name[1024], pname[1024], comp[256], *p, *q;
char name[1024], pname[1024], comp[256], *p;
int i, search;
if(histfrogp <= 0)
......@@ -657,23 +657,10 @@ addlib(char *src, char *obj)
snprint(pname, sizeof pname, "%s/pkg/%s_%s/%s", goroot, goos, goarch, name);
strcpy(name, pname);
}
cleanname(name);
if(debug['v'])
Bprint(&bso, "%5.2f addlib: %s %s pulls in %s\n", cputime(), obj, src, name);
p = strrchr(src, '/');
q = strrchr(name, '/');
if(p != nil && q != nil && p - src == q - name && memcmp(src, name, p - src) == 0) {
// leading paths are the same.
// if the source file refers to an object in its own directory
// and we are inside an archive, ignore the reference, in the hope
// that the archive contains that object too.
if(strchr(obj, '(')) {
if(debug['v'])
Bprint(&bso, "%5.2f ignored srcdir object %s\n", cputime(), name);
return;
}
}
for(i=0; i<libraryp; i++)
if(strcmp(name, library[i]) == 0)
return;
......
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