New Go version
Go 1.12.2 and 1.11.7 are now supported.
NOTE: The default linker on Ubuntu 14.04 doesn't support relocations used in the 1.12.2 distributions. If you're on Ubuntu 14.04, there are a few possible workarounds:
- Stay on
go1.12.1
by callinggo_register_toolchains(go_version = "1.12.1")
in your WORKSPACE. - Build without cgo by using
--features=pure
on the Bazel command line orpure = "on"
ingo_binary
rules. - Configure a custom C/C++ toolchain with a newer linker.
The upstream tracking issue is golang/go#31293.
Bug fixes
- Workarounds for gRPC cross-compilation. As a reminder, the
goos
andgoarch
attributes do not work in conjunction withselect
expressions, which are used in the build files fororg_golang_google_grpc
. Use--platforms
for cross-compilation if possible. See Cross compilation for more information. x_defs
are now correctly applied to themain
package.- Fix some incompatibilities with future Bazel versions.
WORKSPACE code
To use this release, add this code to your WORKSPACE file:
http_archive(
name = "io_bazel_rules_go",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.16.9/rules_go-0.16.9.tar.gz",
sha256 = "452710193e80fd216ae08d7edd0bf74eac0d01ddaaee036a5bc0f3202fb9e447",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()