- Read the steps in https://bazel.build/versions/master/docs/windows.html.
- Read the github issues bazelbuild/bazel#2431 and related bazelbuild/bazel#2449.
- May be useful to consult https://github.com/bazelbuild/bazel/blob/master/tools/cpp/cc_configure.bzl.
- Make sure you install the Feb 5 2016 Msys2 version from https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-x86_64-20160205.exe/download.
- The install path must be
c:\tools\msys64
(hardcoded into bazel).