mirror of
https://github.com/golang/go
synced 2024-11-22 10:44:41 -07:00
cmd/dist: redure max background tasks nr. when building on ARM
R=rsc CC=golang-dev https://golang.org/cl/5642063
This commit is contained in:
parent
56ade2d8d5
commit
119917375b
6
src/cmd/dist/unix.c
vendored
6
src/cmd/dist/unix.c
vendored
@ -147,6 +147,7 @@ static struct {
|
|||||||
char *cmd;
|
char *cmd;
|
||||||
} bg[MAXBG];
|
} bg[MAXBG];
|
||||||
static int nbg;
|
static int nbg;
|
||||||
|
static int maxnbg = nelem(bg);
|
||||||
|
|
||||||
static void bgwait1(void);
|
static void bgwait1(void);
|
||||||
|
|
||||||
@ -158,7 +159,7 @@ genrun(Buf *b, char *dir, int mode, Vec *argv, int wait)
|
|||||||
Buf cmd;
|
Buf cmd;
|
||||||
char *q;
|
char *q;
|
||||||
|
|
||||||
while(nbg >= nelem(bg))
|
while(nbg >= maxnbg)
|
||||||
bgwait1();
|
bgwait1();
|
||||||
|
|
||||||
// Generate a copy of the command to show in a log.
|
// Generate a copy of the command to show in a log.
|
||||||
@ -665,6 +666,9 @@ main(int argc, char **argv)
|
|||||||
fatal("unknown architecture: %s", u.machine);
|
fatal("unknown architecture: %s", u.machine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(strcmp(gohostarch, "arm") == 0)
|
||||||
|
maxnbg = 1;
|
||||||
|
|
||||||
init();
|
init();
|
||||||
xmain(argc, argv);
|
xmain(argc, argv);
|
||||||
bfree(&b);
|
bfree(&b);
|
||||||
|
Loading…
Reference in New Issue
Block a user