Skip to content

Commit

Permalink
cmd/cgo: use "!compiler_bootstrap" tag instead of "go1.18"
Browse files Browse the repository at this point in the history
The illumos builder is using a Go 1.18 prerelease toolchain for
bootstrapping, which doesn't have ast.IndexListExpr. But we can
instead check for the "compiler_bootstrap" build tag that's already
used for distinguishing binaries built for toolchain1.

Fixes golang#48863.

Change-Id: I87b672322eee22a60ab8d0bb3be5f76cffc97545
Reviewed-on: https://go-review.googlesource.com/c/go/+/354695
Trust: Matthew Dempsky <[email protected]>
Run-TryBot: Matthew Dempsky <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
mdempsky committed Oct 8, 2021
1 parent d480b5c commit b9e1e1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cmd/cgo/ast_go1.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !go1.18
// +build !go1.18
//go:build compiler_bootstrap
// +build compiler_bootstrap

package main

Expand Down
4 changes: 2 additions & 2 deletions src/cmd/cgo/ast_go118.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build go1.18
// +build go1.18
//go:build !compiler_bootstrap
// +build !compiler_bootstrap

package main

Expand Down

0 comments on commit b9e1e1b

Please sign in to comment.