]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: document the behavior of multiple build constraints.
authorNigel Tao <nigeltao@golang.org>
Mon, 22 Oct 2012 00:15:17 +0000 (11:15 +1100)
committerNigel Tao <nigeltao@golang.org>
Mon, 22 Oct 2012 00:15:17 +0000 (11:15 +1100)
R=rsc, pkleiweg
CC=golang-dev
https://golang.org/cl/6725052

src/pkg/go/build/doc.go

index 04e48c1547b2f472f4b9b34e927e0295bc6b55c9..df560c38f661fc7bb1047d46000bef3acb5c113f 100644 (file)
 //
 //     (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