]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: support goos,goarch build tags
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 14 Mar 2013 15:04:47 +0000 (19:04 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 14 Mar 2013 15:04:47 +0000 (19:04 +0400)
This is necessary to submit netpoll for linux,386 linux,amd64

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/7470050

src/cmd/dist/build.c

index 2da2a90f1f2d7e8ad1d8660088c95fdf3cadd892..9793702ffd5e3afccd6800e98d9dbd0455dda7fa 100644 (file)
@@ -1046,7 +1046,16 @@ out:
 static bool
 matchfield(char *f)
 {
-       return streq(f, goos) || streq(f, goarch) || streq(f, "cmd_go_bootstrap") || streq(f, "go1.1");
+       char *p;
+       bool res;
+
+       p = xstrrchr(f, ',');
+       if(p == nil)
+               return streq(f, goos) || streq(f, goarch) || streq(f, "cmd_go_bootstrap") || streq(f, "go1.1");
+       *p = 0;
+       res = matchfield(f) && matchfield(p+1);
+       *p = ',';
+       return res;
 }
 
 // shouldbuild reports whether we should build this file.