rules_go: Not working on Windows 10.

When trying to use go_binary on Windows I get:

ERROR: C:/projects/bazel_go_cas/BUILD.bazel:6:1: every rule of type go_binary implicitly depends upon the target '@io_bazel_rules_go_toolchain//:go_toolchain', but this target could not be found because of: no such package '@io_bazel_rules_go_toolchain//': Unsupported operating system: windows 10.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 57 (50 by maintainers)

Commits related to this issue

Most upvoted comments

We have made progress, in fact, we can build fully working cgo binaries now. you can use pacman -S mingw-w64-x86_64-gcc to get the right version of gcc, but it won’t work without a custom CROSSTOOL right now. I am talking to the main Bazel team about making the normal windows crosstool work correctly. Hard coding the path won’t work, you need to affect the cc_library and cc_binary rules that go libraries with cgo use underneath.