From 5158c3db275878f8db034059c4855e74e732eb10 Mon Sep 17 00:00:00 2001
From: Bill Feng <yfen@google.com>
Date: Mon, 8 Apr 2019 14:39:09 -0700
Subject: [PATCH] naming update, documentation fix

---
 WORKSPACE                                                 | 2 +-
 .../{bazel_0.23.2 => bazel_0.23.2_rbe_windows}/BUILD      | 0
 .../cc_toolchain_config.bzl                               | 0
 .../dummy_toolchain.bzl                                   | 0
 tools/internal_ci/linux/grpc_bazel_build_in_docker.sh     | 2 +-
 tools/remote_build/README.md                              | 4 ++--
 tools/remote_build/windows.bazelrc                        | 8 +++-----
 7 files changed, 7 insertions(+), 9 deletions(-)
 rename third_party/toolchains/{bazel_0.23.2 => bazel_0.23.2_rbe_windows}/BUILD (100%)
 rename third_party/toolchains/{bazel_0.23.2 => bazel_0.23.2_rbe_windows}/cc_toolchain_config.bzl (100%)
 rename third_party/toolchains/{bazel_0.23.2 => bazel_0.23.2_rbe_windows}/dummy_toolchain.bzl (100%)

diff --git a/WORKSPACE b/WORKSPACE
index d90d7b6751d..b984438d1d6 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -16,7 +16,7 @@ register_execution_platforms(
 
 register_toolchains(
     "//third_party/toolchains:cc-toolchain-clang-x86_64-default",
-    "//third_party/toolchains/bazel_0.23.2:cc-toolchain-x64_windows",
+    "//third_party/toolchains/bazel_0.23.2_rbe_windows:cc-toolchain-x64_windows",
 )
 
 # TODO(https://github.com/grpc/grpc/issues/18331): Move off of this dependency.
diff --git a/third_party/toolchains/bazel_0.23.2/BUILD b/third_party/toolchains/bazel_0.23.2_rbe_windows/BUILD
similarity index 100%
rename from third_party/toolchains/bazel_0.23.2/BUILD
rename to third_party/toolchains/bazel_0.23.2_rbe_windows/BUILD
diff --git a/third_party/toolchains/bazel_0.23.2/cc_toolchain_config.bzl b/third_party/toolchains/bazel_0.23.2_rbe_windows/cc_toolchain_config.bzl
similarity index 100%
rename from third_party/toolchains/bazel_0.23.2/cc_toolchain_config.bzl
rename to third_party/toolchains/bazel_0.23.2_rbe_windows/cc_toolchain_config.bzl
diff --git a/third_party/toolchains/bazel_0.23.2/dummy_toolchain.bzl b/third_party/toolchains/bazel_0.23.2_rbe_windows/dummy_toolchain.bzl
similarity index 100%
rename from third_party/toolchains/bazel_0.23.2/dummy_toolchain.bzl
rename to third_party/toolchains/bazel_0.23.2_rbe_windows/dummy_toolchain.bzl
diff --git a/tools/internal_ci/linux/grpc_bazel_build_in_docker.sh b/tools/internal_ci/linux/grpc_bazel_build_in_docker.sh
index 93f6bd65fe6..3dd0167b7c0 100755
--- a/tools/internal_ci/linux/grpc_bazel_build_in_docker.sh
+++ b/tools/internal_ci/linux/grpc_bazel_build_in_docker.sh
@@ -25,4 +25,4 @@ git clone /var/local/jenkins/grpc /var/local/git/grpc
 ${name}')
 cd /var/local/git/grpc
 #TODO(yfen): add back examples/... to build targets once python rules issues are resolved
-bazel build --spawn_strategy=standalone --genrule_strategy=standalone :all test/...
\ No newline at end of file
+bazel build --spawn_strategy=standalone --genrule_strategy=standalone :all test/...
diff --git a/tools/remote_build/README.md b/tools/remote_build/README.md
index bb27dc7072c..2cd5f03daf1 100644
--- a/tools/remote_build/README.md
+++ b/tools/remote_build/README.md
@@ -31,8 +31,8 @@ bazel --bazelrc=tools/remote_build/manual.bazelrc test --config=asan //test/...
 
 Run on Windows MSVC:
 ```
-# local manual run only for C++ targets (RBE to be supported)
-bazel --bazelrc=tools/remote_build/windows.bazelrc test //test/cpp/...
+# RBE manual run only for c-core (must be run on a Windows host machine)
+bazel --bazelrc=tools/remote_build/windows.bazelrc build :all [--credentials_json=(path to service account credentials)]
 ```
 
 Available command line options can be found in
diff --git a/tools/remote_build/windows.bazelrc b/tools/remote_build/windows.bazelrc
index a4cb66a7d34..492489f3613 100644
--- a/tools/remote_build/windows.bazelrc
+++ b/tools/remote_build/windows.bazelrc
@@ -1,14 +1,12 @@
-# TODO(yfen): Merge with rbe_common.bazelrc and enable Windows RBE
-
 startup --host_jvm_args=-Dbazel.DigestFunction=SHA256
 
 build --remote_cache=remotebuildexecution.googleapis.com
 build --remote_executor=remotebuildexecution.googleapis.com
 build --tls_enabled=true
 
-build --host_crosstool_top=//third_party/toolchains/bazel_0.23.2:toolchain
-build --crosstool_top=//third_party/toolchains/bazel_0.23.2:toolchain
-build --extra_toolchains=//third_party/toolchains/bazel_0.23.2:cc-toolchain-x64_windows
+build --host_crosstool_top=//third_party/toolchains/bazel_0.23.2_rbe_windows:toolchain
+build --crosstool_top=//third_party/toolchains/bazel_0.23.2_rbe_windows:toolchain
+build --extra_toolchains=//third_party/toolchains/bazel_0.23.2_rbe_windows:cc-toolchain-x64_windows
 # Use custom execution platforms defined in third_party/toolchains
 build --extra_execution_platforms=//third_party/toolchains:rbe_windows
 build --host_platform=//third_party/toolchains:rbe_windows