]> Cypherpunks repositories - gostls13.git/commit
go/build: add BuildTags to Context, allow !tag
authorRuss Cox <rsc@golang.org>
Mon, 23 Jan 2012 20:16:38 +0000 (15:16 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 23 Jan 2012 20:16:38 +0000 (15:16 -0500)
commitb5777571b3ab20ca124fa60c34cd5094098fbb2f
tree6765faebf62682988e031d84832b51e1483a4bcb
parentbf0c190343c094d80e4f675863ab506c3456962f
go/build: add BuildTags to Context, allow !tag

This lets the client of go/build specify additional tags that
can be recognized in a // +build directive.  For example,
a build for a custom environment like App Engine might
include "appengine" in the BuildTags list, so that packages
can be written with some files saying

        // +build appengine   (build only on app engine)

or

        // +build !appengine  (build only when NOT on app engine)

App Engine here is just a hypothetical context.  I plan to use
this in the cmd/go sources to distinguish the bootstrap version
of cmd/go (which will not use networking) from the full version
using a custom tag.  It might also be useful in App Engine.

Also, delete Build and Script, which we did not end up using for
cmd/go and which never got turned on for real in goinstall.

R=r, adg
CC=golang-dev
https://golang.org/cl/5554079
src/cmd/goinstall/main.go
src/pkg/crypto/tls/root_stub.go
src/pkg/go/build/build.go
src/pkg/go/build/build_test.go
src/pkg/go/build/dir.go
src/pkg/net/cgo_stub.go
src/pkg/os/user/lookup_stubs.go