mirror of
https://github.com/golang/go
synced 2024-11-25 23:07:58 -07:00
delete heuristic left over from incremental compilation
R=r DELTA=31 (2 added, 28 deleted, 1 changed) OCL=33064 CL=33112
This commit is contained in:
parent
b5c57fea96
commit
8db677b0a7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user