]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: redure max background tasks nr. when building on ARM
authorShenghou Ma <minux.ma@gmail.com>
Wed, 8 Feb 2012 21:26:00 +0000 (16:26 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 8 Feb 2012 21:26:00 +0000 (16:26 -0500)
R=rsc
CC=golang-dev
https://golang.org/cl/5642063

src/cmd/dist/unix.c

index e687142e906118cb1a62fd2fe2f7f49e4b511fe5..632ebbcdbad1d0e0d4b70bab3600666cb48c1236 100644 (file)
@@ -147,6 +147,7 @@ static struct {
        char *cmd;
 } bg[MAXBG];
 static int nbg;
+static int maxnbg = nelem(bg);
 
 static void bgwait1(void);
 
@@ -158,7 +159,7 @@ genrun(Buf *b, char *dir, int mode, Vec *argv, int wait)
        Buf cmd;
        char *q;
 
-       while(nbg >= nelem(bg))
+       while(nbg >= maxnbg)
                bgwait1();
 
        // 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);
        }
 
+       if(strcmp(gohostarch, "arm") == 0)
+               maxnbg = 1;
+
        init();
        xmain(argc, argv);
        bfree(&b);