From: Dmitriy Vyukov Date: Thu, 14 Mar 2013 15:04:47 +0000 (+0400) Subject: cmd/dist: support goos,goarch build tags X-Git-Tag: go1.1rc2~513 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4dd1b8999a8a10cc3a2f226e187ac6a973e606c1;p=gostls13.git cmd/dist: support goos,goarch build tags This is necessary to submit netpoll for linux,386 linux,amd64 R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/7470050 --- diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c index 2da2a90f1f..9793702ffd 100644 --- a/src/cmd/dist/build.c +++ b/src/cmd/dist/build.c @@ -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.