From: Nigel Tao Date: Mon, 22 Oct 2012 00:15:17 +0000 (+1100) Subject: go/build: document the behavior of multiple build constraints. X-Git-Tag: go1.1rc2~2081 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=80c4eac6379bc43b339a67f47c2559aa71119eec;p=gostls13.git go/build: document the behavior of multiple build constraints. R=rsc, pkleiweg CC=golang-dev https://golang.org/cl/6725052 --- diff --git a/src/pkg/go/build/doc.go b/src/pkg/go/build/doc.go index 04e48c1547..df560c38f6 100644 --- a/src/pkg/go/build/doc.go +++ b/src/pkg/go/build/doc.go @@ -74,6 +74,16 @@ // // (linux AND 386) OR (darwin AND (NOT cgo)) // +// A file may have multiple build constraints. The overall constraint is the AND +// of the individual constraints. That is, the build constraints: +// +// // +build linux darwin +// // +build 386 +// +// corresponds to the boolean formula: +// +// (linux OR darwin) AND 386 +// // During a particular build, the following words are satisfied: // // - the target operating system, as spelled by runtime.GOOS