]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: add go1.10 build tag
authorJoe Tsai <joetsai@digital-static.net>
Fri, 25 Aug 2017 20:43:56 +0000 (13:43 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Fri, 25 Aug 2017 21:48:36 +0000 (21:48 +0000)
Add this early in the cycle so that we can start regression testing
of the master toolchain.

Change-Id: Ida3ccad6e9642648f489babd12877fc8a5eca07a
Reviewed-on: https://go-review.googlesource.com/59151
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/go/build/build.go
src/go/build/doc.go

index e9fd03cd8ca51a7a9edf3ddede62145b7c507ff2..d8163d01723cfa77005b6f356cb7f4051071b726 100644 (file)
@@ -292,7 +292,10 @@ func defaultContext() Context {
        // say "+build go1.x", and code that should only be built before Go 1.x
        // (perhaps it is the stub to use in that case) should say "+build !go1.x".
        // NOTE: If you add to this list, also update the doc comment in doc.go.
-       c.ReleaseTags = []string{"go1.1", "go1.2", "go1.3", "go1.4", "go1.5", "go1.6", "go1.7", "go1.8", "go1.9"}
+       const version = 10 // go1.10
+       for i := 1; i <= version; i++ {
+               c.ReleaseTags = append(c.ReleaseTags, "go1."+strconv.Itoa(i))
+       }
 
        env := os.Getenv("CGO_ENABLED")
        if env == "" {
index 422e1a5ffd20023df05923e1b03ec2d1add2ae5c..daa9a756714f8c1c1fbe1ed1848e58d7dcc1ad85 100644 (file)
 //     - "go1.7", from Go version 1.7 onward
 //     - "go1.8", from Go version 1.8 onward
 //     - "go1.9", from Go version 1.9 onward
+//     - "go1.10", from Go version 1.10 onward
 //     - any additional words listed in ctxt.BuildTags
 //
 // If a file's name, after stripping the extension and a possible _test suffix,