diff --git a/.gitmodules b/.gitmodules
index 1619401d70c..ab0000daa60 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,48 +1,4 @@
-[submodule "third_party/zlib"]
-	path = third_party/zlib
-	url = https://github.com/madler/zlib
-	# When using CMake to build, the zlib submodule ends up with a
-	# generated file that makes Git consider the submodule dirty. This
-	# state can be ignored for day-to-day development on gRPC.
-	ignore = dirty
-[submodule "third_party/protobuf"]
-	path = third_party/protobuf
-	url = https://github.com/google/protobuf.git
-	branch = 3.0.x
-[submodule "third_party/gflags"]
-	path = third_party/gflags
-	url = https://github.com/gflags/gflags.git
-[submodule "third_party/googletest"]
-	path = third_party/googletest
-	url = https://github.com/google/googletest.git
-[submodule "third_party/boringssl"]
-	path = third_party/boringssl
-	url = https://github.com/google/boringssl.git
-[submodule "third_party/benchmark"]
-	path = third_party/benchmark
-	url = https://github.com/google/benchmark
-[submodule "third_party/boringssl-with-bazel"]
-	path = third_party/boringssl-with-bazel
-	url = https://github.com/google/boringssl.git
 [submodule "third_party/cares/cares"]
 	path = third_party/cares/cares
 	url = https://github.com/c-ares/c-ares.git
 	branch = cares-1_12_0
-[submodule "third_party/bloaty"]
-	path = third_party/bloaty
-	url = https://github.com/google/bloaty.git
-[submodule "third_party/abseil-cpp"]
-	path = third_party/abseil-cpp
-	url = https://github.com/abseil/abseil-cpp
-[submodule "third_party/envoy-api"]
-	path = third_party/envoy-api
-	url = https://github.com/envoyproxy/data-plane-api.git
-[submodule "third_party/googleapis"]
-	path = third_party/googleapis
-	url = https://github.com/googleapis/googleapis.git
-[submodule "third_party/protoc-gen-validate"]
-	path = third_party/protoc-gen-validate
-	url = https://github.com/envoyproxy/protoc-gen-validate.git
-[submodule "third_party/udpa"]
-	path = third_party/udpa
-	url = https://github.com/cncf/udpa.git
diff --git a/third_party/py/BUILD b/README
similarity index 100%
rename from third_party/py/BUILD
rename to README
diff --git a/src/core/lib/gprpp/atomic.h b/src/core/lib/gprpp/atomic.h
index 095ebf12565..4a53d2cfa55 100644
--- a/src/core/lib/gprpp/atomic.h
+++ b/src/core/lib/gprpp/atomic.h
@@ -28,12 +28,12 @@
 namespace grpc_core {
 
 enum class MemoryOrder {
-  RELAXED = std::memory_order_relaxed,
-  CONSUME = std::memory_order_consume,
-  ACQUIRE = std::memory_order_acquire,
-  RELEASE = std::memory_order_release,
-  ACQ_REL = std::memory_order_acq_rel,
-  SEQ_CST = std::memory_order_seq_cst
+  RELAXED = static_cast<int>(std::memory_order_relaxed),
+  CONSUME = static_cast<int>(std::memory_order_consume),
+  ACQUIRE = static_cast<int>(std::memory_order_acquire),
+  RELEASE = static_cast<int>(std::memory_order_release),
+  ACQ_REL = static_cast<int>(std::memory_order_acq_rel),
+  SEQ_CST = static_cast<int>(std::memory_order_seq_cst)
 };
 
 template <typename T>
diff --git a/third_party/BUILD b/third_party/BUILD
deleted file mode 100644
index f0135652238..00000000000
--- a/third_party/BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-exports_files([
-    "gtest.BUILD",
-    "zlib.BUILD",
-    "twisted.BUILD",
-    "yaml.BUILD",
-    "incremental.BUILD",
-    "zope_interface.BUILD",
-    "constantly.BUILD",
-    "cython.BUILD",
-    "six.BUILD",
-    "enum34.BUILD",
-    "futures.BUILD",
-])
diff --git a/third_party/abseil-cpp b/third_party/abseil-cpp
deleted file mode 160000
index 74d91756c11..00000000000
--- a/third_party/abseil-cpp
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 74d91756c11bc22f9b0108b94da9326f7f9e376f
diff --git a/third_party/benchmark b/third_party/benchmark
deleted file mode 160000
index 090faecb454..00000000000
--- a/third_party/benchmark
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 090faecb454fbd6e6e17a75ef8146acb037118d4
diff --git a/third_party/bloaty b/third_party/bloaty
deleted file mode 160000
index 73594cde8c9..00000000000
--- a/third_party/bloaty
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 73594cde8c9a52a102c4341c244c833aa61b9c06
diff --git a/third_party/boringssl b/third_party/boringssl
deleted file mode 160000
index 7f02881e96e..00000000000
--- a/third_party/boringssl
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7f02881e96e51f1873afcf384d02f782b48967ca
diff --git a/third_party/boringssl-with-bazel b/third_party/boringssl-with-bazel
deleted file mode 160000
index 83da28a68f3..00000000000
--- a/third_party/boringssl-with-bazel
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 83da28a68f32023fd3b95a8ae94991a07b1f6c62
diff --git a/third_party/constantly.BUILD b/third_party/constantly.BUILD
deleted file mode 100644
index f1f93cb79fc..00000000000
--- a/third_party/constantly.BUILD
+++ /dev/null
@@ -1,7 +0,0 @@
-py_library(
-    name = "constantly",
-    srcs = glob(["constantly/*.py"]),
-    visibility = [
-        "//visibility:public",
-    ],
-)
diff --git a/third_party/cython.BUILD b/third_party/cython.BUILD
deleted file mode 100644
index ce9283e2a41..00000000000
--- a/third_party/cython.BUILD
+++ /dev/null
@@ -1,29 +0,0 @@
-# Adapted with modifications from tensorflow/third_party/cython.BUILD
-
-py_library(
-    name="cython_lib",
-    srcs=glob(
-        ["Cython/**/*.py"],
-        exclude=[
-            "**/Tests/*.py",
-        ],
-    ) + ["cython.py"],
-    data=glob([
-        "Cython/**/*.pyx",
-        "Cython/Utility/*.*",
-        "Cython/Includes/**/*.pxd",
-    ]),
-    srcs_version="PY2AND3",
-    visibility=["//visibility:public"],
-)
-
-# May not be named "cython", since that conflicts with Cython/ on OSX
-py_binary(
-    name="cython_binary",
-    srcs=["cython.py"],
-    main="cython.py",
-    srcs_version="PY2AND3",
-    visibility=["//visibility:public"],
-    deps=["cython_lib"],
-)
-
diff --git a/third_party/enum34.BUILD b/third_party/enum34.BUILD
deleted file mode 100644
index 3fc2b3de571..00000000000
--- a/third_party/enum34.BUILD
+++ /dev/null
@@ -1,6 +0,0 @@
-py_library(
-  name = "enum34",
-  srcs = ["enum/__init__.py"],
-  srcs_version = "PY2AND3",
-  visibility = ["//visibility:public"],
-)
diff --git a/third_party/envoy-api b/third_party/envoy-api
deleted file mode 160000
index c181f78882e..00000000000
--- a/third_party/envoy-api
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c181f78882e54c0e5c63f332562ef6954ee7932f
diff --git a/third_party/futures.BUILD b/third_party/futures.BUILD
deleted file mode 100644
index c280e1edfd7..00000000000
--- a/third_party/futures.BUILD
+++ /dev/null
@@ -1,6 +0,0 @@
-py_library(
-  name = "futures",
-  srcs = glob(["concurrent/**/*.py"]),
-  srcs_version = "PY2AND3",
-  visibility = ["//visibility:public"],
-)
diff --git a/third_party/gflags b/third_party/gflags
deleted file mode 160000
index 28f50e0fed1..00000000000
--- a/third_party/gflags
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 28f50e0fed19872e0fd50dd23ce2ee8cd759338e
diff --git a/third_party/googleapis b/third_party/googleapis
deleted file mode 160000
index 80ed4d0bbf6..00000000000
--- a/third_party/googleapis
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 80ed4d0bbf65d57cc267dfc63bd2584557f11f9b
diff --git a/third_party/googletest b/third_party/googletest
deleted file mode 160000
index c9ccac7cb73..00000000000
--- a/third_party/googletest
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c9ccac7cb7345901884aabf5d1a786cfa6e2f397
diff --git a/third_party/incremental.BUILD b/third_party/incremental.BUILD
deleted file mode 100644
index f2a06b49dc4..00000000000
--- a/third_party/incremental.BUILD
+++ /dev/null
@@ -1,10 +0,0 @@
-py_library(
-    name = "incremental",
-    srcs = glob(["src/incremental/*.py"]),
-    imports = [
-        "src",
-    ],
-    visibility = [
-        "//visibility:public",
-    ],
-)
diff --git a/third_party/objective_c/Cronet/BUILD b/third_party/objective_c/Cronet/BUILD
deleted file mode 100644
index 8d8a1d55d48..00000000000
--- a/third_party/objective_c/Cronet/BUILD
+++ /dev/null
@@ -1,27 +0,0 @@
-# gRPC Bazel BUILD file.
-#
-# Copyright 2019 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-licenses(["notice"])  # Apache v2
-
-package(default_visibility = ["//:__subpackages__"])
-
-# C Header files used by GRPC C Transport.
-cc_library(
-    name = "cronet_c_for_grpc",
-    hdrs = [
-        "bidirectional_stream_c.h",
-    ]
-)
diff --git a/third_party/objective_c/Cronet/bidirectional_stream_c.h b/third_party/objective_c/Cronet/bidirectional_stream_c.h
deleted file mode 100644
index ffb235ae874..00000000000
--- a/third_party/objective_c/Cronet/bidirectional_stream_c.h
+++ /dev/null
@@ -1,246 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_GRPC_SUPPORT_INCLUDE_BIDIRECTIONAL_STREAM_C_H_
-#define COMPONENTS_GRPC_SUPPORT_INCLUDE_BIDIRECTIONAL_STREAM_C_H_
-
-#if defined(WIN32)
-#define GRPC_SUPPORT_EXPORT
-#else
-#define GRPC_SUPPORT_EXPORT __attribute__((visibility("default")))
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stddef.h>
-
-/* Engine API. */
-
-/* Opaque object representing a Bidirectional stream creating engine. Created
- * and configured outside of this API to facilitate sharing with other
- * components */
-typedef struct stream_engine {
-  void* obj;
-  void* annotation;
-} stream_engine;
-
-/* Bidirectional Stream API */
-
-/* Opaque object representing Bidirectional Stream. */
-typedef struct bidirectional_stream {
-  void* obj;
-  void* annotation;
-} bidirectional_stream;
-
-/* A single request or response header element. */
-typedef struct bidirectional_stream_header {
-  const char* key;
-  const char* value;
-} bidirectional_stream_header;
-
-/* Array of request or response headers or trailers. */
-typedef struct bidirectional_stream_header_array {
-  size_t count;
-  size_t capacity;
-  bidirectional_stream_header* headers;
-} bidirectional_stream_header_array;
-
-/* Set of callbacks used to receive callbacks from bidirectional stream. */
-typedef struct bidirectional_stream_callback {
-  /* Invoked when the stream is ready for reading and writing.
-   * Consumer may call bidirectional_stream_read() to start reading data.
-   * Consumer may call bidirectional_stream_write() to start writing
-   * data.
-   */
-  void (*on_stream_ready)(bidirectional_stream* stream);
-
-  /* Invoked when initial response headers are received.
-   * Consumer must call bidirectional_stream_read() to start reading.
-   * Consumer may call bidirectional_stream_write() to start writing or
-   * close the stream. Contents of |headers| is valid for duration of the call.
-   */
-  void (*on_response_headers_received)(
-      bidirectional_stream* stream,
-      const bidirectional_stream_header_array* headers,
-      const char* negotiated_protocol);
-
-  /* Invoked when data is read into the buffer passed to
-   * bidirectional_stream_read(). Only part of the buffer may be
-   * populated. To continue reading, call bidirectional_stream_read().
-   * It may be invoked after on_response_trailers_received()}, if there was
-   * pending read data before trailers were received.
-   *
-   * If |bytes_read| is 0, it means the remote side has signaled that it will
-   * send no more data; future calls to bidirectional_stream_read()
-   * will result in the on_data_read() callback or on_succeded() callback if
-   * bidirectional_stream_write() was invoked with end_of_stream set to
-   * true.
-   */
-  void (*on_read_completed)(bidirectional_stream* stream,
-                            char* data,
-                            int bytes_read);
-
-  /**
-   * Invoked when all data passed to bidirectional_stream_write() is
-   * sent. To continue writing, call bidirectional_stream_write().
-   */
-  void (*on_write_completed)(bidirectional_stream* stream, const char* data);
-
-  /* Invoked when trailers are received before closing the stream. Only invoked
-   * when server sends trailers, which it may not. May be invoked while there is
-   * read data remaining in local buffer. Contents of |trailers| is valid for
-   * duration of the call.
-   */
-  void (*on_response_trailers_received)(
-      bidirectional_stream* stream,
-      const bidirectional_stream_header_array* trailers);
-
-  /**
-   * Invoked when there is no data to be read or written and the stream is
-   * closed successfully remotely and locally. Once invoked, no further callback
-   * methods will be invoked.
-   */
-  void (*on_succeded)(bidirectional_stream* stream);
-
-  /**
-   * Invoked if the stream failed for any reason after
-   * bidirectional_stream_start(). HTTP/2 error codes are
-   * mapped to chrome net error codes. Once invoked, no further callback methods
-   * will be invoked.
-   */
-  void (*on_failed)(bidirectional_stream* stream, int net_error);
-
-  /**
-   * Invoked if the stream was canceled via
-   * bidirectional_stream_cancel(). Once invoked, no further callback
-   * methods will be invoked.
-   */
-  void (*on_canceled)(bidirectional_stream* stream);
-} bidirectional_stream_callback;
-
-/* Creates a new stream object that uses |engine| and |callback|. All stream
- * tasks are performed asynchronously on the |engine| network thread. |callback|
- * methods are invoked synchronously on the |engine| network thread, but must
- * not run tasks on the current thread to prevent blocking networking operations
- * and causing exceptions during shutdown. The |annotation| is stored in
- * bidirectional stream for arbitrary use by application.
- *
- * Returned |bidirectional_stream*| is owned by the caller, and must be
- * destroyed using |bidirectional_stream_destroy|.
- *
- * Both |calback| and |engine| must remain valid until stream is destroyed.
- */
-GRPC_SUPPORT_EXPORT
-bidirectional_stream* bidirectional_stream_create(
-    stream_engine* engine,
-    void* annotation,
-    bidirectional_stream_callback* callback);
-
-/* TBD: The following methods return int. Should it be a custom type? */
-
-/* Destroys stream object. Destroy could be called from any thread, including
- * network thread, but is posted, so |stream| is valid until calling task is
- * complete.
- */
-GRPC_SUPPORT_EXPORT
-int bidirectional_stream_destroy(bidirectional_stream* stream);
-
-/**
- * Disables or enables auto flush. By default, data is flushed after
- * every bidirectional_stream_write(). If the auto flush is disabled,
- * the client should explicitly call bidirectional_stream_flush to flush
- * the data.
- */
-GRPC_SUPPORT_EXPORT void bidirectional_stream_disable_auto_flush(
-    bidirectional_stream* stream,
-    bool disable_auto_flush);
-
-/**
- * Delays sending request headers until bidirectional_stream_flush()
- * is called. This flag is currently only respected when QUIC is negotiated.
- * When true, QUIC will send request header frame along with data frame(s)
- * as a single packet when possible.
- */
-GRPC_SUPPORT_EXPORT
-void bidirectional_stream_delay_request_headers_until_flush(
-    bidirectional_stream* stream,
-    bool delay_headers_until_flush);
-
-/* Starts the stream by sending request to |url| using |method| and |headers|.
- * If |end_of_stream| is true, then no data is expected to be written. The
- * |method| is HTTP verb, with PUT having a special meaning to mark idempotent
- * request, which could use QUIC 0-RTT.
- */
-GRPC_SUPPORT_EXPORT
-int bidirectional_stream_start(bidirectional_stream* stream,
-                               const char* url,
-                               int priority,
-                               const char* method,
-                               const bidirectional_stream_header_array* headers,
-                               bool end_of_stream);
-
-/* Reads response data into |buffer| of |capacity| length. Must only be called
- * at most once in response to each invocation of the
- * on_stream_ready()/on_response_headers_received() and on_read_completed()
- * methods of the bidirectional_stream_callback.
- * Each call will result in an invocation of the callback's
- * on_read_completed() method if data is read, or its on_failed() method if
- * there's an error. The callback's on_succeeded() method is also invoked if
- * there is no more data to read and |end_of_stream| was previously sent.
- */
-GRPC_SUPPORT_EXPORT
-int bidirectional_stream_read(bidirectional_stream* stream,
-                              char* buffer,
-                              int capacity);
-
-/* Writes request data from |buffer| of |buffer_length| length. If auto flush is
- * disabled, data will be sent only after bidirectional_stream_flush() is
- * called.
- * Each call will result in an invocation the callback's on_write_completed()
- * method if data is sent, or its on_failed() method if there's an error.
- * The callback's on_succeeded() method is also invoked if |end_of_stream| is
- * set and all response data has been read.
- */
-GRPC_SUPPORT_EXPORT
-int bidirectional_stream_write(bidirectional_stream* stream,
-                               const char* buffer,
-                               int buffer_length,
-                               bool end_of_stream);
-
-/**
- * Flushes pending writes. This method should not be called before invocation of
- * on_stream_ready() method of the bidirectional_stream_callback.
- * For each previously called bidirectional_stream_write()
- * a corresponding on_write_completed() callback will be invoked when the buffer
- * is sent.
- */
-GRPC_SUPPORT_EXPORT
-void bidirectional_stream_flush(bidirectional_stream* stream);
-
-/* Cancels the stream. Can be called at any time after
- * bidirectional_stream_start(). The on_canceled() method of
- * bidirectional_stream_callback will be invoked when cancelation
- * is complete and no further callback methods will be invoked. If the
- * stream has completed or has not started, calling
- * bidirectional_stream_cancel() has no effect and on_canceled() will not
- * be invoked. At most one callback method may be invoked after
- * bidirectional_stream_cancel() has completed.
- */
-GRPC_SUPPORT_EXPORT
-void bidirectional_stream_cancel(bidirectional_stream* stream);
-
-/* Returns true if the |stream| was successfully started and is now done
- * (succeeded, canceled, or failed).
- * Returns false if the |stream| stream is not yet started or is in progress.
- */
-GRPC_SUPPORT_EXPORT
-bool bidirectional_stream_is_done(bidirectional_stream* stream);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // COMPONENTS_GRPC_SUPPORT_INCLUDE_BIDIRECTIONAL_STREAM_H_
diff --git a/third_party/objective_c/google_toolbox_for_mac/BUILD b/third_party/objective_c/google_toolbox_for_mac/BUILD
deleted file mode 100644
index 9fc517c45eb..00000000000
--- a/third_party/objective_c/google_toolbox_for_mac/BUILD
+++ /dev/null
@@ -1,28 +0,0 @@
-# gRPC Bazel BUILD file.
-#
-# Copyright 2019 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-licenses(["notice"])
-native.objc_library(
-    name = "GTM_GoogleTestRunner_GTM_USING_XCTEST",
-    testonly = 1,
-    srcs = [
-        "UnitTesting/GTMGoogleTestRunner.mm",
-    ],
-    deps = [
-        "//external:gtest",
-    ],
-    visibility = ["//visibility:public"]
-)
diff --git a/third_party/objective_c/google_toolbox_for_mac/UnitTesting/GTMGoogleTestRunner.mm b/third_party/objective_c/google_toolbox_for_mac/UnitTesting/GTMGoogleTestRunner.mm
deleted file mode 100644
index 20b2855cfb1..00000000000
--- a/third_party/objective_c/google_toolbox_for_mac/UnitTesting/GTMGoogleTestRunner.mm
+++ /dev/null
@@ -1,226 +0,0 @@
-//
-//  GTMGoogleTestRunner.mm
-//
-//  Copyright 2013 Google Inc.
-//
-//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
-//  use this file except in compliance with the License.  You may obtain a copy
-//  of the License at
-//
-//  http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-//  License for the specific language governing permissions and limitations under
-//  the License.
-//
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-// This is a XCTest based unit test that will run all of the GoogleTest
-// https://code.google.com/p/googletest/
-// based tests in the project, and will report results correctly via XCTest so
-// that Xcode can pick them up in it's UI.
-
-// XCTest dynamically creates one XCTest per GoogleTest.
-// GoogleTest is set up using a custom event listener (GoogleTestPrinter)
-// which knows how to log GoogleTest test results in a manner that XCTest (and
-// the Xcode IDE) understand.
-
-// Note that this does not able you to control individual tests from the Xcode
-// UI. You can only turn on/off all of the C++ tests. It does however give
-// you output that you can click on in the Xcode UI and immediately jump to a
-// test failure.
-
-// This class is not compiled as part of the standard Google Toolbox For Mac
-// project because of it's dependency on https://code.google.com/p/googletest/
-
-// To use this:
-// - Add GTMGoogleTestRunner to your test bundle sources.
-// - Add gtest-all.cc from gtest to your test bundle sources.
-// - Write some C++ tests and add them to your test bundle sources.
-// - Build and run tests. Your C++ tests should just execute.
-
-// NOTE:
-// A key difference between how GTMGoogleTestRunner runs tests versus how a
-// "standard" unit test package runs tests is that SetUpTestSuite/SetupTestCase
-// and TeardownTestSuite/TeardownTestCase are going to be called before/after
-// *every* individual test. Unfortunately this is due to restrictions in the
-// design of GoogleTest in that the only way to run individual tests is to
-// use a filter to focus on a specific test, and then "run" all the tests
-// multiple times.
-// If you have state that you need maintained across tests (not normally a
-// great idea anyhow), using SetUp*, Teardown* is not going to work for you.
-
-#import <XCTest/XCTest.h>
-#import <objc/runtime.h>
-
-#include <gtest/gtest.h>
-
-using ::testing::EmptyTestEventListener;
-using ::testing::TestCase;
-using ::testing::TestEventListener;
-using ::testing::TestEventListeners;
-using ::testing::TestInfo;
-using ::testing::TestPartResult;
-using ::testing::TestResult;
-using ::testing::UnitTest;
-
-namespace {
-
-// A gtest printer that takes care of reporting gtest results via the
-// XCTest interface. Note that a test suite in XCTest == a test case in gtest
-// and a test case in XCTest == a test in gtest.
-// This will handle fatal and non-fatal gtests properly.
-class GoogleTestPrinter : public EmptyTestEventListener {
- public:
-  GoogleTestPrinter(XCTestCase *test_case) : test_case_(test_case) {}
-
-  virtual ~GoogleTestPrinter() {}
-
-  virtual void OnTestPartResult(const TestPartResult &test_part_result) {
-    if (!test_part_result.passed()) {
-      const char *file_name = test_part_result.file_name();
-      NSString *file = @(file_name ? file_name : "<file name unavailable>");
-      int line = test_part_result.line_number();
-      NSString *summary = @(test_part_result.summary());
-
-      // gtest likes to give multi-line summaries. These don't look good in
-      // the Xcode UI, so we clean them up.
-      NSString *oneLineSummary =
-          [summary stringByReplacingOccurrencesOfString:@"\n" withString:@" "];
-      BOOL expected = test_part_result.nonfatally_failed();
-      [test_case_ recordFailureWithDescription:oneLineSummary
-                                        inFile:file
-                                        atLine:line
-                                      expected:expected];
-    }
-  }
-
- private:
-  XCTestCase *test_case_;
-};
-
-NSString *SelectorNameFromGTestName(NSString *testName) {
-  NSRange dot = [testName rangeOfString:@"."];
-  return [NSString stringWithFormat:@"%@::%@",
-          [testName substringToIndex:dot.location],
-          [testName substringFromIndex:dot.location + 1]];
-}
-
-}  // namespace
-
-// GTMGoogleTestRunner is a GTMTestCase that makes a sub test suite populated
-// with all of the GoogleTest unit tests.
-@interface GTMGoogleTestRunner : XCTestCase {
-  NSString *testName_;
-}
-
-// The name for a test is the GoogleTest name which is "TestCase.Test"
-- (id)initWithName:(NSString *)testName;
-@end
-
-@implementation GTMGoogleTestRunner
-
-+ (void)initGoogleTest {
-  static dispatch_once_t onceToken;
-  dispatch_once(&onceToken, ^{
-    NSArray *arguments = [NSProcessInfo processInfo].arguments;
-    int argc = (int)arguments.count;
-    char **argv = static_cast<char **>(alloca((sizeof(char *) * (argc + 1))));
-    for (int index = 0; index < argc; index++) {
-      argv[index] = const_cast<char *> ([arguments[index] UTF8String]);
-    }
-    argv[argc] = NULL;
-
-    testing::InitGoogleTest(&argc, argv);
-  });
-}
-
-+ (id)defaultTestSuite {
-  [GTMGoogleTestRunner initGoogleTest];
-  XCTestSuite *result = [[XCTestSuite alloc] initWithName:NSStringFromClass(self)];
-  UnitTest *test = UnitTest::GetInstance();
-
-  // Walk the GoogleTest tests, adding sub tests and sub suites as appropriate.
-  int total_test_case_count = test->total_test_case_count();
-  for (int i = 0; i < total_test_case_count; ++i) {
-    const TestCase *test_case = test->GetTestCase(i);
-    int total_test_count = test_case->total_test_count();
-    XCTestSuite *subSuite = [[XCTestSuite alloc] initWithName:@(test_case->name())];
-    [result addTest:subSuite];
-    for (int j = 0; j < total_test_count; ++j) {
-      const TestInfo *test_info = test_case->GetTestInfo(j);
-      NSString *testName = [NSString stringWithFormat:@"%s.%s",
-                            test_case->name(), test_info->name()];
-      XCTestCase *xcTest = [[self alloc] initWithName:testName];
-      [subSuite addTest:xcTest];
-    }
-  }
-  return result;
-}
-
-- (id)initWithName:(NSString *)testName {
-  // Xcode 6.1 started taking the testName from the selector instead of calling
-  // -name.
-  // So we will add selectors to GTMGoogleTestRunner.
-  // They should all be unique because the selectors are named cppclass.method
-  // Filed as radar 18798444.
-  Class cls = [self class];
-  NSString *selectorTestName = SelectorNameFromGTestName(testName);
-  SEL selector = sel_registerName([selectorTestName UTF8String]);
-  Method method = class_getInstanceMethod(cls, @selector(runGoogleTest));
-  IMP implementation = method_getImplementation(method);
-  const char *encoding = method_getTypeEncoding(method);
-  if (!class_addMethod(cls, selector, implementation, encoding)) {
-    // If we can't add a method, we should blow up here.
-    [NSException raise:NSInternalInconsistencyException
-                format:@"Unable to add %@ to %@.", testName, cls];
-  }
-  if ((self = [super initWithSelector:selector])) {
-    testName_ = testName;
-  }
-  return self;
-}
-
-- (NSString *)name {
-  // An XCTest name must be "-[foo bar]" or it won't be parsed properly.
-  NSRange dot = [testName_ rangeOfString:@"."];
-  return [NSString stringWithFormat:@"-[%@ %@]",
-          [testName_ substringToIndex:dot.location],
-          [testName_ substringFromIndex:dot.location + 1]];
-}
-
-- (void)runGoogleTest {
-  [GTMGoogleTestRunner initGoogleTest];
-
-  // Gets hold of the event listener list.
-  TestEventListeners& listeners = UnitTest::GetInstance()->listeners();
-
-  // Adds a listener to the end.
-  GoogleTestPrinter printer = GoogleTestPrinter(self);
-  listeners.Append(&printer);
-
-  // Remove the default printer if it exists.
-  TestEventListener *defaultListener = listeners.default_result_printer();
-  if (defaultListener) {
-    delete listeners.Release(defaultListener);
-  }
-
-  // Since there is no way of running a single GoogleTest directly, we use the
-  // filter mechanism in GoogleTest to simulate it for us.
-  ::testing::GTEST_FLAG(filter) = [testName_ UTF8String];
-
-  // Intentionally ignore return value of RUN_ALL_TESTS. We will be printing
-  // the output appropriately, and there is no reason to mark this test as
-  // "failed" if RUN_ALL_TESTS returns non-zero.
-  (void)RUN_ALL_TESTS();
-
-  // Remove the listener that we added.
-  listeners.Release(&printer);
-}
-
-@end
diff --git a/third_party/protobuf b/third_party/protobuf
deleted file mode 160000
index 09745575a92..00000000000
--- a/third_party/protobuf
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 09745575a923640154bcf307fba8aedff47f240a
diff --git a/third_party/protoc-gen-validate b/third_party/protoc-gen-validate
deleted file mode 160000
index e143189bf6f..00000000000
--- a/third_party/protoc-gen-validate
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit e143189bf6f37b3957fb31743df6a1bcf4a8c685
diff --git a/third_party/py/BUILD.tpl b/third_party/py/BUILD.tpl
deleted file mode 100644
index 8f010f85a03..00000000000
--- a/third_party/py/BUILD.tpl
+++ /dev/null
@@ -1,37 +0,0 @@
-# Adapted with modifications from tensorflow/third_party/py/
-
-package(default_visibility=["//visibility:public"])
-
-config_setting(
-    name="windows",
-    values={"cpu": "x64_windows"},
-    visibility=["//visibility:public"],
-)
-
-config_setting(
-    name="python2",
-    flag_values = {"@rules_python//python:python_version": "PY2"}
-)
-
-config_setting(
-    name="python3",
-    flag_values = {"@rules_python//python:python_version": "PY3"}
-)
-
-cc_library(
-    name = "python_lib",
-    deps = select({
-        ":python2": ["//_python2:_python2_lib"],
-        ":python3": ["//_python3:_python3_lib"],
-        "//conditions:default": ["not-existing.lib"],
-    })
-)
-
-cc_library(
-    name = "python_headers",
-    deps = select({
-        ":python2": ["//_python2:_python2_headers"],
-        ":python3": ["//_python3:_python3_headers"],
-        "//conditions:default": ["not-existing.headers"],
-    })
-)
diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl
deleted file mode 100644
index 6f9a178a057..00000000000
--- a/third_party/py/python_configure.bzl
+++ /dev/null
@@ -1,328 +0,0 @@
-# Adapted with modifications from tensorflow/third_party/py/
-"""Repository rule for Python autoconfiguration.
-
-`python_configure` depends on the following environment variables:
-
-  * `PYTHON2_BIN_PATH`: location of python binary.
-  * `PYTHON2_LIB_PATH`: Location of python libraries.
-"""
-
-_BAZEL_SH = "BAZEL_SH"
-_PYTHON2_BIN_PATH = "PYTHON2_BIN_PATH"
-_PYTHON2_LIB_PATH = "PYTHON2_LIB_PATH"
-_PYTHON3_BIN_PATH = "PYTHON3_BIN_PATH"
-_PYTHON3_LIB_PATH = "PYTHON3_LIB_PATH"
-
-
-def _tpl(repository_ctx, tpl, substitutions={}, out=None):
-    if not out:
-        out = tpl
-    repository_ctx.template(out, Label("//third_party/py:%s.tpl" % tpl),
-                            substitutions)
-
-
-def _fail(msg):
-    """Output failure message when auto configuration fails."""
-    red = "\033[0;31m"
-    no_color = "\033[0m"
-    fail("%sPython Configuration Error:%s %s\n" % (red, no_color, msg))
-
-
-def _is_windows(repository_ctx):
-    """Returns true if the host operating system is windows."""
-    os_name = repository_ctx.os.name.lower()
-    return os_name.find("windows") != -1
-
-
-def _execute(repository_ctx,
-             cmdline,
-             error_msg=None,
-             error_details=None,
-             empty_stdout_fine=False):
-    """Executes an arbitrary shell command.
-
-    Args:
-        repository_ctx: the repository_ctx object
-        cmdline: list of strings, the command to execute
-        error_msg: string, a summary of the error if the command fails
-        error_details: string, details about the error or steps to fix it
-        empty_stdout_fine: bool, if True, an empty stdout result is fine, otherwise
-        it's an error
-    Return:
-        the result of repository_ctx.execute(cmdline)
-  """
-    result = repository_ctx.execute(cmdline)
-    if result.stderr or not (empty_stdout_fine or result.stdout):
-        _fail("\n".join([
-            error_msg.strip() if error_msg else "Repository command failed",
-            result.stderr.strip(), error_details if error_details else ""
-        ]))
-    else:
-        return result
-
-
-def _read_dir(repository_ctx, src_dir):
-    """Returns a string with all files in a directory.
-
-  Finds all files inside a directory, traversing subfolders and following
-  symlinks. The returned string contains the full path of all files
-  separated by line breaks.
-  """
-    if _is_windows(repository_ctx):
-        src_dir = src_dir.replace("/", "\\")
-        find_result = _execute(
-            repository_ctx,
-            ["cmd.exe", "/c", "dir", src_dir, "/b", "/s", "/a-d"],
-            empty_stdout_fine=True)
-        # src_files will be used in genrule.outs where the paths must
-        # use forward slashes.
-        return find_result.stdout.replace("\\", "/")
-    else:
-        find_result = _execute(
-            repository_ctx, ["find", src_dir, "-follow", "-type", "f"],
-            empty_stdout_fine=True)
-        return find_result.stdout
-
-
-def _genrule(src_dir, genrule_name, command, outs):
-    """Returns a string with a genrule.
-
-  Genrule executes the given command and produces the given outputs.
-  """
-    return ('genrule(\n' + '    name = "' + genrule_name + '",\n' +
-            '    outs = [\n' + outs + '\n    ],\n' + '    cmd = """\n' +
-            command + '\n   """,\n' + ')\n')
-
-
-def _normalize_path(path):
-    """Returns a path with '/' and remove the trailing slash."""
-    path = path.replace("\\", "/")
-    if path[-1] == "/":
-        path = path[:-1]
-    return path
-
-
-def _symlink_genrule_for_dir(repository_ctx,
-                             src_dir,
-                             dest_dir,
-                             genrule_name,
-                             src_files=[],
-                             dest_files=[]):
-    """Returns a genrule to symlink(or copy if on Windows) a set of files.
-
-  If src_dir is passed, files will be read from the given directory; otherwise
-  we assume files are in src_files and dest_files
-  """
-    if src_dir != None:
-        src_dir = _normalize_path(src_dir)
-        dest_dir = _normalize_path(dest_dir)
-        files = '\n'.join(
-            sorted(_read_dir(repository_ctx, src_dir).splitlines()))
-        # Create a list with the src_dir stripped to use for outputs.
-        dest_files = files.replace(src_dir, '').splitlines()
-        src_files = files.splitlines()
-    command = []
-    outs = []
-    for i in range(len(dest_files)):
-        if dest_files[i] != "":
-            # If we have only one file to link we do not want to use the dest_dir, as
-            # $(@D) will include the full path to the file.
-            dest = '$(@D)/' + dest_dir + dest_files[i] if len(
-                dest_files) != 1 else '$(@D)/' + dest_files[i]
-            # On Windows, symlink is not supported, so we just copy all the files.
-            cmd = 'cp -f' if _is_windows(repository_ctx) else 'ln -s'
-            command.append(cmd + ' "%s" "%s"' % (src_files[i], dest))
-            outs.append('        "' + dest_dir + dest_files[i] + '",')
-    return _genrule(src_dir, genrule_name, " && ".join(command),
-                    "\n".join(outs))
-
-
-def _get_python_bin(repository_ctx, bin_path_key, default_bin_path):
-    """Gets the python bin path."""
-    python_bin = repository_ctx.os.environ.get(bin_path_key, default_bin_path)
-    if not repository_ctx.path(python_bin).exists:
-        # It's a command, use 'which' to find its path.
-        python_bin_path = repository_ctx.which(python_bin)
-    else:
-        # It's a path, use it as it is.
-        python_bin_path = python_bin
-    if python_bin_path != None:
-        return str(python_bin_path)
-    _fail("Cannot find python in PATH, please make sure " +
-          "python is installed and add its directory in PATH, or --define " +
-          "%s='/something/else'.\nPATH=%s" %
-          (bin_path_key, repository_ctx.os.environ.get("PATH", "")))
-
-
-def _get_bash_bin(repository_ctx):
-    """Gets the bash bin path."""
-    bash_bin = repository_ctx.os.environ.get(_BAZEL_SH)
-    if bash_bin != None:
-        return bash_bin
-    else:
-        bash_bin_path = repository_ctx.which("bash")
-        if bash_bin_path != None:
-            return str(bash_bin_path)
-        else:
-            _fail(
-                "Cannot find bash in PATH, please make sure " +
-                "bash is installed and add its directory in PATH, or --define "
-                + "%s='/path/to/bash'.\nPATH=%s" %
-                (_BAZEL_SH, repository_ctx.os.environ.get("PATH", "")))
-
-
-def _get_python_lib(repository_ctx, python_bin, lib_path_key):
-    """Gets the python lib path."""
-    python_lib = repository_ctx.os.environ.get(lib_path_key)
-    if python_lib != None:
-        return python_lib
-    print_lib = (
-        "<<END\n" + "from __future__ import print_function\n" +
-        "import site\n" + "import os\n" + "\n" + "try:\n" +
-        "  input = raw_input\n" + "except NameError:\n" + "  pass\n" + "\n" +
-        "python_paths = []\n" + "if os.getenv('PYTHONPATH') is not None:\n" +
-        "  python_paths = os.getenv('PYTHONPATH').split(':')\n" + "try:\n" +
-        "  library_paths = site.getsitepackages()\n" +
-        "except AttributeError:\n" +
-        " from distutils.sysconfig import get_python_lib\n" +
-        " library_paths = [get_python_lib()]\n" +
-        "all_paths = set(python_paths + library_paths)\n" + "paths = []\n" +
-        "for path in all_paths:\n" + "  if os.path.isdir(path):\n" +
-        "    paths.append(path)\n" + "if len(paths) >=1:\n" +
-        "  print(paths[0])\n" + "END")
-    cmd = '%s - %s' % (python_bin, print_lib)
-    result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd])
-    return result.stdout.strip('\n')
-
-
-def _check_python_lib(repository_ctx, python_lib):
-    """Checks the python lib path."""
-    cmd = 'test -d "%s" -a -x "%s"' % (python_lib, python_lib)
-    result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd])
-    if result.return_code == 1:
-        _fail("Invalid python library path: %s" % python_lib)
-
-
-def _check_python_bin(repository_ctx, python_bin, bin_path_key):
-    """Checks the python bin path."""
-    cmd = '[[ -x "%s" ]] && [[ ! -d "%s" ]]' % (python_bin, python_bin)
-    result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd])
-    if result.return_code == 1:
-        _fail("--define %s='%s' is not executable. Is it the python binary?" %
-              (bin_path_key, python_bin))
-
-
-def _get_python_include(repository_ctx, python_bin):
-    """Gets the python include path."""
-    result = _execute(
-        repository_ctx, [
-            python_bin, "-c", 'from __future__ import print_function;' +
-            'from distutils import sysconfig;' +
-            'print(sysconfig.get_python_inc())'
-        ],
-        error_msg="Problem getting python include path.",
-        error_details=(
-            "Is the Python binary path set up right? " + "(See ./configure or "
-            + _PYTHON2_BIN_PATH + ".) " + "Is distutils installed?"))
-    return result.stdout.splitlines()[0]
-
-
-def _get_python_import_lib_name(repository_ctx, python_bin, bin_path_key):
-    """Get Python import library name (pythonXY.lib) on Windows."""
-    result = _execute(
-        repository_ctx, [
-            python_bin, "-c",
-            'import sys;' + 'print("python" + str(sys.version_info[0]) + ' +
-            '      str(sys.version_info[1]) + ".lib")'
-        ],
-        error_msg="Problem getting python import library.",
-        error_details=("Is the Python binary path set up right? " +
-                       "(See ./configure or " + bin_path_key + ".) "))
-    return result.stdout.splitlines()[0]
-
-
-def _create_single_version_package(repository_ctx,
-                                   variety_name,
-                                   bin_path_key,
-                                   default_bin_path,
-                                   lib_path_key):
-    """Creates the repository containing files set up to build with Python."""
-    python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path)
-    _check_python_bin(repository_ctx, python_bin, bin_path_key)
-    python_lib = _get_python_lib(repository_ctx, python_bin, lib_path_key)
-    _check_python_lib(repository_ctx, python_lib)
-    python_include = _get_python_include(repository_ctx, python_bin)
-    python_include_rule = _symlink_genrule_for_dir(
-        repository_ctx, python_include, '{}_include'.format(variety_name),
-        '{}_include'.format(variety_name))
-    python_import_lib_genrule = ""
-    # To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib
-    # See https://docs.python.org/3/extending/windows.html
-    if _is_windows(repository_ctx):
-        python_include = _normalize_path(python_include)
-        python_import_lib_name = _get_python_import_lib_name, bin_path_key(
-            repository_ctx, python_bin)
-        python_import_lib_src = python_include.rsplit(
-            '/', 1)[0] + "/libs/" + python_import_lib_name
-        python_import_lib_genrule = _symlink_genrule_for_dir(
-            repository_ctx, None, '', '{}_import_lib'.format(variety_name),
-            [python_import_lib_src], [python_import_lib_name])
-    _tpl(
-        repository_ctx, "variety", {
-            "%{PYTHON_INCLUDE_GENRULE}": python_include_rule,
-            "%{PYTHON_IMPORT_LIB_GENRULE}": python_import_lib_genrule,
-            "%{VARIETY_NAME}": variety_name,
-        },
-        out="{}/BUILD".format(variety_name))
-
-
-def _python_autoconf_impl(repository_ctx):
-    """Implementation of the python_autoconf repository rule."""
-    _create_single_version_package(repository_ctx,
-                                   "_python2",
-                                   _PYTHON2_BIN_PATH,
-                                   "python",
-                                   _PYTHON2_LIB_PATH)
-    _create_single_version_package(repository_ctx,
-                                   "_python3",
-                                   _PYTHON3_BIN_PATH,
-                                   "python3",
-                                   _PYTHON3_LIB_PATH)
-    _tpl(repository_ctx, "BUILD")
-
-
-python_configure = repository_rule(
-    implementation = _python_autoconf_impl,
-    environ = [
-        _BAZEL_SH,
-        _PYTHON2_BIN_PATH,
-        _PYTHON2_LIB_PATH,
-        _PYTHON3_BIN_PATH,
-        _PYTHON3_LIB_PATH,
-    ],
-    attrs={
-        "_build_tpl": attr.label(
-            default = Label("//third_party/py:BUILD.tpl"),
-            allow_single_file = True,
-        ),
-        "_variety_tpl": attr.label(
-            default = Label("//third_party/py:variety.tpl"),
-            allow_single_file = True,
-        ),
-    },
-)
-"""Detects and configures the local Python.
-
-It is expected that the system have both a working Python 2 and python 3
-installation
-
-Add the following to your WORKSPACE FILE:
-
-```python
-python_configure(name = "local_config_python")
-```
-
-Args:
-  name: A unique name for this workspace rule.
-"""
-
diff --git a/third_party/py/variety.tpl b/third_party/py/variety.tpl
deleted file mode 100644
index 0c466d6d8f0..00000000000
--- a/third_party/py/variety.tpl
+++ /dev/null
@@ -1,26 +0,0 @@
-package(default_visibility=["//visibility:public"])
-
-# To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib
-# See https://docs.python.org/3/extending/windows.html
-cc_import(
-    name="%{VARIETY_NAME}_lib",
-    interface_library=select({
-        "//:windows": ":%{VARIETY_NAME}_import_lib",
-        # A placeholder for Unix platforms which makes --no_build happy.
-        "//conditions:default": "not-existing.lib",
-    }),
-    system_provided=1,
-)
-
-cc_library(
-    name="%{VARIETY_NAME}_headers",
-    hdrs=[":%{VARIETY_NAME}_include"],
-    deps=select({
-        "//:windows": [":%{VARIETY_NAME}_lib"],
-        "//conditions:default": [],
-    }),
-    includes=["%{VARIETY_NAME}_include"],
-)
-
-%{PYTHON_INCLUDE_GENRULE}
-%{PYTHON_IMPORT_LIB_GENRULE}
diff --git a/third_party/rake-compiler-dock/Dockerfile b/third_party/rake-compiler-dock/Dockerfile
deleted file mode 100644
index e2a721c7362..00000000000
--- a/third_party/rake-compiler-dock/Dockerfile
+++ /dev/null
@@ -1,14 +0,0 @@
-FROM larskanis/rake-compiler-dock-mri:0.7.2
-
-RUN find / -name rbconfig.rb | while read f ; do sed -i 's/0x0501/0x0600/' $f ; done
-RUN find / -name win32.h | while read f ; do sed -i 's/gettimeofday/rb_gettimeofday/' $f ; done
-RUN find / -name libwinpthread.dll.a | xargs rm
-RUN find / -name libwinpthread-1.dll | xargs rm
-RUN find / -name *msvcrt-ruby*.dll.a | while read f ; do n=`echo $f | sed s/.dll//` ; mv $f $n ; done
-RUN apt-get install -y g++-multilib
-
-# Make the system to have GLIBC 2.12 instead of 2.23 so that
-# generated ruby package can run on CentOS 6 with GLIBC 2.12
-RUN sed -i 's/__GLIBC_MINOR__\t23/__GLIBC_MINOR__\t12/' /usr/include/features.h
-
-CMD bash
diff --git a/third_party/rake-compiler-dock/LICENSE.txt b/third_party/rake-compiler-dock/LICENSE.txt
deleted file mode 100644
index b884ba5396d..00000000000
--- a/third_party/rake-compiler-dock/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2015 Lars Kanis
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/third_party/rake-compiler-dock/README.md b/third_party/rake-compiler-dock/README.md
deleted file mode 100644
index 0a9aa8ba78f..00000000000
--- a/third_party/rake-compiler-dock/README.md
+++ /dev/null
@@ -1 +0,0 @@
-This is a modified Dockerfile taken from [rake-compiler-dock](https://github.com/rake-compiler/rake-compiler-dock) for the purpose of building gRPC's ruby gem.
diff --git a/third_party/six.BUILD b/third_party/six.BUILD
deleted file mode 100644
index 60dc7811492..00000000000
--- a/third_party/six.BUILD
+++ /dev/null
@@ -1,6 +0,0 @@
-py_library(
-    name = "six",
-    srcs = ["six.py"],
-    srcs_version = "PY2AND3",
-    visibility = ["//visibility:public"],
-)
diff --git a/third_party/toolchains/BUILD b/third_party/toolchains/BUILD
deleted file mode 100644
index ab2282d005d..00000000000
--- a/third_party/toolchains/BUILD
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 2017 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-licenses(["notice"])  # Apache v2
-
-package(default_visibility = ["//visibility:public"])
-
-alias(
-    name = "rbe_windows",
-    actual = ":rbe_windows_1803",
-)
-
-# RBE Windows
-platform(
-    name = "rbe_windows_1803",
-    constraint_values = [
-        "@bazel_tools//platforms:x86_64",
-        "@bazel_tools//platforms:windows",
-        "@bazel_tools//tools/cpp:msvc",
-    ],
-    remote_execution_properties = """
-        properties: {
-          name: "container-image"
-          value:"docker://gcr.io/grpc-testing/rbe_windows_toolchain@sha256:75728e7d6d804090f71095e5fec627b18cfa1f47adc52096c209f2a687e06b2e"
-        }
-        properties: {
-          name: "gceMachineType"  # Small machines for majority of tests.
-          value: "n1-highmem-2"
-        }
-        properties:{
-            name: "OSFamily"
-            value: "Windows"
-        }
-
-        """,
-)
-
-# RBE Ubuntu16_04 r346485
-platform(
-    name = "rbe_ubuntu1604",
-    parents = ["@rbe_default//config:platform"],
-    constraint_values = [
-        "//third_party/toolchains/machine_size:standard",
-    ],
-    remote_execution_properties = """
-        {PARENT_REMOTE_EXECUTION_PROPERTIES}
-        properties: {
-          name: "gceMachineType"  # Small machines for majority of tests.
-          value: "n1-highmem-2"
-        }
-        properties: {
-            name: "dockerSiblingContainers"
-            value: "false"
-        }
-        properties: {
-            name: "dockerNetwork"
-            value: "off"
-        }
-        properties: {
-            name: "dockerAddCapabilities"
-            value: "SYS_PTRACE"
-        }
-        properties: {
-            name: "dockerPrivileged"
-            value: "true"
-        }
-        """,
-)
-
-platform(
-    name = "rbe_ubuntu1604_large",
-    parents = ["@rbe_default//config:platform"],
-    constraint_values = [
-        "//third_party/toolchains/machine_size:large",
-    ],
-    remote_execution_properties = """
-        {PARENT_REMOTE_EXECUTION_PROPERTIES}
-        properties: {
-          name: "gceMachineType"  # Large machines for some resource demanding tests (TSAN).
-          value: "n1-standard-8"
-        }
-        properties: {
-            name: "dockerSiblingContainers"
-            value: "false"
-        }
-        properties: {
-            name: "dockerNetwork"
-            value: "off"
-        }
-        properties: {
-            name: "dockerAddCapabilities"
-            value: "SYS_PTRACE"
-        }
-        properties: {
-            name: "dockerPrivileged"
-            value: "true"
-        }
-    """,
-)
-
-platform(
-    name = "local",
-    parents = ["@bazel_tools//platforms:target_platform"],
-    constraint_values = [
-        "//third_party/toolchains/machine_size:standard",
-    ],
-)
-
-platform(
-    name = "local_large",
-    parents = ["@bazel_tools//platforms:target_platform"],
-    constraint_values = [
-        "//third_party/toolchains/machine_size:large",
-    ],
-)
diff --git a/third_party/toolchains/bazel_0.26.0_rbe_windows/BUILD b/third_party/toolchains/bazel_0.26.0_rbe_windows/BUILD
deleted file mode 100644
index 5a74a06ddbd..00000000000
--- a/third_party/toolchains/bazel_0.26.0_rbe_windows/BUILD
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright 2018 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This becomes the BUILD file for @local_config_cc// under Windows.
-
-package(default_visibility = ["//visibility:public"])
-
-load(":cc_toolchain_config.bzl", "cc_toolchain_config")
-
-cc_library(
-    name = "malloc",
-)
-
-filegroup(
-    name = "empty",
-    srcs = [],
-)
-
-# Hardcoded toolchain, legacy behaviour.
-cc_toolchain_suite(
-    name = "toolchain",
-    toolchains = {
-        "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
-        "x64_windows|msvc-cl": ":cc-compiler-x64_windows",
-        "x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys",
-        "x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw",
-        "x64_windows_msys": ":cc-compiler-x64_windows_msys",
-        "x64_windows": ":cc-compiler-x64_windows",
-        "armeabi-v7a": ":cc-compiler-armeabi-v7a",
-    },
-)
-
-cc_toolchain(
-    name = "cc-compiler-x64_windows_msys",
-    toolchain_identifier = "msys_x64",
-    toolchain_config = ":msys_x64",
-    all_files = ":empty",
-    ar_files = ":empty",
-    as_files = ":empty",
-    compiler_files = ":empty",
-    dwp_files = ":empty",
-    linker_files = ":empty",
-    objcopy_files = ":empty",
-    strip_files = ":empty",
-    supports_param_files = 1,
-)
-
-cc_toolchain_config(
-    name = "msys_x64",
-    cpu = "x64_windows",
-    compiler = "msys-gcc",
-)
-
-toolchain(
-    name = "cc-toolchain-x64_windows_msys",
-    exec_compatible_with = [
-        "@bazel_tools//platforms:x86_64",
-        "@bazel_tools//platforms:windows",
-        "@bazel_tools//tools/cpp:msys",
-    ],
-    target_compatible_with = [
-        "@bazel_tools//platforms:x86_64",
-        "@bazel_tools//platforms:windows",
-    ],
-    toolchain = ":cc-compiler-x64_windows_msys",
-    toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-cc_toolchain(
-    name = "cc-compiler-x64_windows_mingw",
-    toolchain_identifier = "msys_x64_mingw",
-    toolchain_config = ":msys_x64_mingw",
-    all_files = ":empty",
-    ar_files = ":empty",
-    as_files = ":empty",
-    compiler_files = ":empty",
-    dwp_files = ":empty",
-    linker_files = ":empty",
-    objcopy_files = ":empty",
-    strip_files = ":empty",
-    supports_param_files = 0,
-)
-
-cc_toolchain_config(
-    name = "msys_x64_mingw",
-    cpu = "x64_windows",
-    compiler = "mingw-gcc",
-)
-
-toolchain(
-    name = "cc-toolchain-x64_windows_mingw",
-    exec_compatible_with = [
-        "@bazel_tools//platforms:x86_64",
-        "@bazel_tools//platforms:windows",
-        "@bazel_tools//tools/cpp:mingw",
-    ],
-    target_compatible_with = [
-        "@bazel_tools//platforms:x86_64",
-        "@bazel_tools//platforms:windows",
-    ],
-    toolchain = ":cc-compiler-x64_windows_mingw",
-    toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-cc_toolchain(
-    name = "cc-compiler-x64_windows",
-    toolchain_identifier = "msvc_x64",
-    toolchain_config = ":msvc_x64",
-    all_files = ":empty",
-    ar_files = ":empty",
-    as_files = ":empty",
-    compiler_files = ":empty",
-    dwp_files = ":empty",
-    linker_files = ":empty",
-    objcopy_files = ":empty",
-    strip_files = ":empty",
-    supports_param_files = 1,
-)
-
-cc_toolchain_config(
-    name = "msvc_x64",
-    cpu = "x64_windows",
-    compiler = "msvc-cl",
-)
-
-toolchain(
-    name = "cc-toolchain-x64_windows",
-    exec_compatible_with = [
-        "@bazel_tools//platforms:x86_64",
-        "@bazel_tools//platforms:windows",
-    ],
-    target_compatible_with = [
-        "@bazel_tools//platforms:x86_64",
-        "@bazel_tools//platforms:windows",
-    ],
-    toolchain = ":cc-compiler-x64_windows",
-    toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-cc_toolchain(
-    name = "cc-compiler-armeabi-v7a",
-    toolchain_identifier = "stub_armeabi-v7a",
-    toolchain_config = ":stub_armeabi-v7a",
-    all_files = ":empty",
-    ar_files = ":empty",
-    as_files = ":empty",
-    compiler_files = ":empty",
-    dwp_files = ":empty",
-    linker_files = ":empty",
-    objcopy_files = ":empty",
-    strip_files = ":empty",
-    supports_param_files = 1,
-)
-
-cc_toolchain_config(
-    name = "stub_armeabi-v7a",
-    cpu = "armeabi-v7a",
-    compiler = "compiler",
-)
-
-toolchain(
-    name = "cc-toolchain-armeabi-v7a",
-    exec_compatible_with = [
-    ],
-    target_compatible_with = [
-        "@bazel_tools//platforms:arm",
-        "@bazel_tools//platforms:android",
-    ],
-    toolchain = ":cc-compiler-armeabi-v7a",
-    toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-filegroup(
-    name = "link_dynamic_library",
-    srcs = ["link_dynamic_library.sh"],
-)
-
diff --git a/third_party/toolchains/bazel_0.26.0_rbe_windows/Dockerfile b/third_party/toolchains/bazel_0.26.0_rbe_windows/Dockerfile
deleted file mode 100644
index bbfce76436d..00000000000
--- a/third_party/toolchains/bazel_0.26.0_rbe_windows/Dockerfile
+++ /dev/null
@@ -1,96 +0,0 @@
-# This Dockerfile creates an image that:
-# - Has the correct MTU setting for networking from inside the container to work.
-# - Has Visual Studio 2015 Build Tools installed.
-# - Has msys2 + git, curl, zip, unzip installed.
-# - Has Python 2.7 installed.
-# - Has Bazel installed.
-
-# TODO(jsharpe): Consider replacing "ADD $URI $DEST" with "Invoke-WebRequest -Method Get -Uri $URI -OutFile $DEST"
-
-# Use the latest Windows Server Core image.
-#
-# WARNING: What's the `:1803` about? There are two versions of Windows Server
-# 2016: a "regular" one (corresponding to `microsoft/windowsservercore`) is on
-# a slow release cadence, and a fast release cadence one (corresponding to
-# `microsoft/windowsservercore:1803`). If you chose a different image than
-# described above, probably omit the `:1803` or change it to a different
-# number.
-FROM microsoft/windowsservercore:1803
-
-SHELL ["powershell.exe", "-ExecutionPolicy", "Bypass", "-Command", "$ErrorActionPreference='Stop'; $ProgressPreference='SilentlyContinue'; $VerbosePreference = 'Continue';"]
-
-# TODO(b/112379377): Workaround until bug is fixed.
-RUN netsh interface ipv4 set subinterface \"vEthernet (Ethernet)\" mtu=1460 store=persistent
-
-# Install Visual Studio 2015 Build Tools.
-RUN Invoke-WebRequest "https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe" \
-                -OutFile visualcppbuildtools_full.exe -UseBasicParsing ; \
-        Start-Process -FilePath 'visualcppbuildtools_full.exe' -ArgumentList '/quiet', '/NoRestart' -Wait ; \
-        Remove-Item .\visualcppbuildtools_full.exe;
-
-# TODO(jsharpe): Alternate install for msys2: https://github.com/StefanScherer/dockerfiles-windows/issues/30
-
-# Install 7-Zip and add it to the path.
-ADD https://www.7-zip.org/a/7z1801-x64.msi C:\\TEMP\\7z.msi
-RUN Start-Process msiexec.exe -ArgumentList \"/i C:\\TEMP\\7z.msi /qn /norestart /log C:\\TEMP\\7z_install_log.txt\" -wait
-RUN $oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path; \
-  $newpath = \"$oldpath;C:\Program Files\7-Zip\"; \
-  Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
-
-# Install msys2, and add some extra tools.
-ADD http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20161025.tar.xz C:\\TEMP\\msys2.tar.xz
-RUN 7z x C:\TEMP\msys2.tar.xz -oC:\TEMP\msys2.tar
-RUN 7z x C:\TEMP\msys2.tar -oC:\tools
-RUN $oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path; \
-  $newpath = \"$oldpath;C:\tools\msys64;C:\tools\msys64\usr\bin\"; \
-  Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
-RUN Start-Process msys2 -ArgumentList 'pacman -noconfirm -Syuu git curl zip unzip' -Wait
-
-# Install Visual C++ Redistributable for Visual Studio 2015:
-ADD https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe C:\\TEMP\\vc_redist.x64.exe
-RUN C:\TEMP\vc_redist.x64.exe /quiet /install
-
-# Install Python 2.7.
-ADD https://www.python.org/ftp/python/2.7.14/python-2.7.14.amd64.msi C:\\TEMP\\python.msi
-RUN Start-Process msiexec.exe -ArgumentList \"/i C:\\TEMP\\python.msi /qn /norestart /log C:\\TEMP\\python_install_log.txt\" -wait
-RUN $oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path; \
-  $newpath = \"$oldpath;C:\Python27\"; \
-  Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
-
-# Install Bazel.
-RUN Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name BAZEL_SH -Value \"C:\tools\msys64\usr\bin\bash.exe\"
-RUN Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name BAZEL_VC -Value \"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\"
-RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;
-ADD https://github.com/bazelbuild/bazel/releases/download/0.26.0/bazel-0.26.0-windows-x86_64.exe C:\\bin\\bazel.exe
-RUN $oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path; \
-  $newpath = \"$oldpath;C:\bin\"; \
-  Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
-
-# TODO(jsharpe): This requires entropy so may be problematic on a headless machine: https://wiki.archlinux.org/index.php/Pacman/Package_signing#Initializing_the_keyring
-RUN Start-Process msys2 -ArgumentList 'pacman-key --init' -Wait
-# TODO(jsharpe): If you don't run this then the next command can't succeed since it needs to prompt to remove catgets.
-RUN pacman --noconfirm -R libcatgets catgets
-# Bazel documentation says to use -Syuu but this doesn't work in Docker. See
-# http://g/foundry-windows/PDMVXbGew7Y
-RUN pacman --noconfirm -Syy git curl zip unzip
-
-RUN \
-  Add-Type -AssemblyName \"System.IO.Compression.FileSystem\"; \
-  $zulu_url = \"https://cdn.azul.com/zulu/bin/zulu8.28.0.1-jdk8.0.163-win_x64.zip\"; \
-  $zulu_zip = \"c:\\temp\\zulu8.28.0.1-jdk8.0.163-win_x64.zip\"; \
-  $zulu_extracted_path = \"c:\\temp\\\" + [IO.Path]::GetFileNameWithoutExtension($zulu_zip); \
-  $zulu_root = \"c:\\openjdk\"; \
-  (New-Object Net.WebClient).DownloadFile($zulu_url, $zulu_zip); \
-  [System.IO.Compression.ZipFile]::ExtractToDirectory($zulu_zip, \"c:\\temp\"); \
-  Move-Item $zulu_extracted_path -Destination $zulu_root; \
-  Remove-Item $zulu_zip; \
-  $env:PATH = [Environment]::GetEnvironmentVariable(\"PATH\", \"Machine\") + \";${zulu_root}\\bin\"; \
-  [Environment]::SetEnvironmentVariable(\"PATH\", $env:PATH, \"Machine\"); \
-  $env:JAVA_HOME = $zulu_root; \
-  [Environment]::SetEnvironmentVariable(\"JAVA_HOME\", $env:JAVA_HOME, \"Machine\")
-
-# Restore default shell for Windows containers.
-SHELL ["cmd.exe", "/s", "/c"]
-
-# Default to PowerShell if no other command specified.
-CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
diff --git a/third_party/toolchains/bazel_0.26.0_rbe_windows/cc_toolchain_config.bzl b/third_party/toolchains/bazel_0.26.0_rbe_windows/cc_toolchain_config.bzl
deleted file mode 100644
index 20b4316c591..00000000000
--- a/third_party/toolchains/bazel_0.26.0_rbe_windows/cc_toolchain_config.bzl
+++ /dev/null
@@ -1,1728 +0,0 @@
-# Copyright 2019 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""A Starlark cc_toolchain configuration rule"""
-load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl",
-     "action_config",
-     "artifact_name_pattern",
-     "env_entry",
-     "env_set",
-     "feature",
-     "feature_set",
-     "flag_group",
-     "flag_set",
-     "make_variable",
-     "tool",
-     "tool_path",
-     "variable_with_value",
-     "with_feature_set",
-     )
-load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
-
-
-all_compile_actions = [
-    ACTION_NAMES.c_compile,
-    ACTION_NAMES.cpp_compile,
-    ACTION_NAMES.linkstamp_compile,
-    ACTION_NAMES.assemble,
-    ACTION_NAMES.preprocess_assemble,
-    ACTION_NAMES.cpp_header_parsing,
-    ACTION_NAMES.cpp_module_compile,
-    ACTION_NAMES.cpp_module_codegen,
-    ACTION_NAMES.clif_match,
-    ACTION_NAMES.lto_backend,
-]
-
-all_cpp_compile_actions = [
-    ACTION_NAMES.cpp_compile,
-    ACTION_NAMES.linkstamp_compile,
-    ACTION_NAMES.cpp_header_parsing,
-    ACTION_NAMES.cpp_module_compile,
-    ACTION_NAMES.cpp_module_codegen,
-    ACTION_NAMES.clif_match,
-]
-
-preprocessor_compile_actions = [
-    ACTION_NAMES.c_compile,
-    ACTION_NAMES.cpp_compile,
-    ACTION_NAMES.linkstamp_compile,
-    ACTION_NAMES.preprocess_assemble,
-    ACTION_NAMES.cpp_header_parsing,
-    ACTION_NAMES.cpp_module_compile,
-    ACTION_NAMES.clif_match,
-]
-
-codegen_compile_actions = [
-    ACTION_NAMES.c_compile,
-    ACTION_NAMES.cpp_compile,
-    ACTION_NAMES.linkstamp_compile,
-    ACTION_NAMES.assemble,
-    ACTION_NAMES.preprocess_assemble,
-    ACTION_NAMES.cpp_module_codegen,
-    ACTION_NAMES.lto_backend,
-]
-
-all_link_actions = [
-    ACTION_NAMES.cpp_link_executable,
-    ACTION_NAMES.cpp_link_dynamic_library,
-    ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-]
-
-def _windows_msvc_impl(ctx):
-    toolchain_identifier = "msvc_x64"
-    host_system_name = "local"
-    target_system_name = "local"
-    target_cpu = "x64_windows"
-    target_libc = "msvcrt"
-    compiler = "msvc-cl"
-    abi_version = "local"
-    abi_libc_version = "local"
-    cc_target_os = None
-    builtin_sysroot = None
-
-    cxx_builtin_include_directories = [
-        # This is a workaround for https://github.com/bazelbuild/bazel/issues/5087.
-        "C:\\botcode\\w",
-        "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE",
-        "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt"
-    ]
-
-    cpp_link_nodeps_dynamic_library_action = action_config(
-        action_name = ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-        implies = [
-            "nologo",
-            "shared_flag",
-            "linkstamps",
-            "output_execpath_flags",
-            "input_param_flags",
-            "user_link_flags",
-            "default_link_flags",
-            "linker_subsystem_flag",
-            "linker_param_file",
-            "msvc_env",
-            "no_stripping",
-            "has_configured_linker_path",
-            "def_file",
-        ],
-        tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe")],
-    )
-
-    cpp_link_static_library_action = action_config(
-        action_name = ACTION_NAMES.cpp_link_static_library,
-        implies = [
-            "nologo",
-            "archiver_flags",
-            "input_param_flags",
-            "linker_param_file",
-            "msvc_env",
-        ],
-        tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/lib.exe")],
-    )
-
-    assemble_action = action_config(
-        action_name = ACTION_NAMES.assemble,
-        implies = [
-            "compiler_input_flags",
-            "compiler_output_flags",
-            "nologo",
-            "msvc_env",
-            "sysroot",
-        ],
-        tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/ml64.exe")],
-    )
-
-    preprocess_assemble_action = action_config(
-        action_name = ACTION_NAMES.preprocess_assemble,
-        implies = [
-            "compiler_input_flags",
-            "compiler_output_flags",
-            "nologo",
-            "msvc_env",
-            "sysroot",
-        ],
-        tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/ml64.exe")],
-    )
-
-    c_compile_action = action_config(
-        action_name = ACTION_NAMES.c_compile,
-        implies = [
-            "compiler_input_flags",
-            "compiler_output_flags",
-            "default_compile_flags",
-            "nologo",
-            "msvc_env",
-            "parse_showincludes",
-            "user_compile_flags",
-            "sysroot",
-            "unfiltered_compile_flags",
-        ],
-        tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe")],
-    )
-
-    cpp_compile_action = action_config(
-        action_name = ACTION_NAMES.cpp_compile,
-        implies = [
-            "compiler_input_flags",
-            "compiler_output_flags",
-            "default_compile_flags",
-            "nologo",
-            "msvc_env",
-            "parse_showincludes",
-            "user_compile_flags",
-            "sysroot",
-            "unfiltered_compile_flags",
-        ],
-        tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe")],
-    )
-
-    cpp_link_executable_action = action_config(
-        action_name = ACTION_NAMES.cpp_link_executable,
-        implies = [
-            "nologo",
-            "linkstamps",
-            "output_execpath_flags",
-            "input_param_flags",
-            "user_link_flags",
-            "default_link_flags",
-            "linker_subsystem_flag",
-            "linker_param_file",
-            "msvc_env",
-            "no_stripping",
-        ],
-        tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe")],
-    )
-
-    cpp_link_dynamic_library_action = action_config(
-        action_name = ACTION_NAMES.cpp_link_dynamic_library,
-        implies = [
-            "nologo",
-            "shared_flag",
-            "linkstamps",
-            "output_execpath_flags",
-            "input_param_flags",
-            "user_link_flags",
-            "default_link_flags",
-            "linker_subsystem_flag",
-            "linker_param_file",
-            "msvc_env",
-            "no_stripping",
-            "has_configured_linker_path",
-            "def_file",
-        ],
-        tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe")],
-    )
-
-    action_configs = [
-        assemble_action,
-        preprocess_assemble_action,
-        c_compile_action,
-        cpp_compile_action,
-        cpp_link_executable_action,
-        cpp_link_dynamic_library_action,
-        cpp_link_nodeps_dynamic_library_action,
-        cpp_link_static_library_action,
-    ]
-
-    msvc_link_env_feature = feature(
-        name = "msvc_link_env",
-        env_sets = [
-            env_set(
-                actions = all_link_actions +
-                          [ACTION_NAMES.cpp_link_static_library],
-                env_entries = [env_entry(key = "LIB", value = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.10240.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\8.1\\lib\\winv6.3\\um\\x64;")],
-            ),
-        ],
-    )
-
-    shared_flag_feature = feature(
-        name = "shared_flag",
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.cpp_link_dynamic_library,
-                    ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-                ],
-                flag_groups = [flag_group(flags = ["/DLL"])],
-            ),
-        ],
-    )
-
-    determinism_feature = feature(
-        name = "determinism",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [
-                    flag_group(
-                        flags = [
-                            "/wd4117",
-                            "-D__DATE__=\"redacted\"",
-                            "-D__TIMESTAMP__=\"redacted\"",
-                            "-D__TIME__=\"redacted\"",
-                        ],
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    sysroot_feature = feature(
-        name = "sysroot",
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.cpp_link_executable,
-                    ACTION_NAMES.cpp_link_dynamic_library,
-                    ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flags = ["--sysroot=%{sysroot}"],
-                        iterate_over = "sysroot",
-                        expand_if_available = "sysroot",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    unfiltered_compile_flags_feature = feature(
-        name = "unfiltered_compile_flags",
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flags = ["%{unfiltered_compile_flags}"],
-                        iterate_over = "unfiltered_compile_flags",
-                        expand_if_available = "unfiltered_compile_flags",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    compiler_param_file_feature = feature(
-        name = "compiler_param_file",
-    )
-
-    copy_dynamic_libraries_to_binary_feature = feature(name = "copy_dynamic_libraries_to_binary")
-
-    input_param_flags_feature = feature(
-        name = "input_param_flags",
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.cpp_link_dynamic_library,
-                    ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flags = ["/IMPLIB:%{interface_library_output_path}"],
-                        expand_if_available = "interface_library_output_path",
-                    ),
-                ],
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [
-                    flag_group(
-                        flags = ["%{libopts}"],
-                        iterate_over = "libopts",
-                        expand_if_available = "libopts",
-                    ),
-                ],
-            ),
-            flag_set(
-                actions = all_link_actions +
-                          [ACTION_NAMES.cpp_link_static_library],
-                flag_groups = [
-                    flag_group(
-                        iterate_over = "libraries_to_link",
-                        flag_groups = [
-                            flag_group(
-                                iterate_over = "libraries_to_link.object_files",
-                                flag_groups = [flag_group(flags = ["%{libraries_to_link.object_files}"])],
-                                expand_if_equal = variable_with_value(
-                                    name = "libraries_to_link.type",
-                                    value = "object_file_group",
-                                ),
-                            ),
-                            flag_group(
-                                flag_groups = [flag_group(flags = ["%{libraries_to_link.name}"])],
-                                expand_if_equal = variable_with_value(
-                                    name = "libraries_to_link.type",
-                                    value = "object_file",
-                                ),
-                            ),
-                            flag_group(
-                                flag_groups = [flag_group(flags = ["%{libraries_to_link.name}"])],
-                                expand_if_equal = variable_with_value(
-                                    name = "libraries_to_link.type",
-                                    value = "interface_library",
-                                ),
-                            ),
-                            flag_group(
-                                flag_groups = [
-                                  flag_group(
-                                      flags = ["%{libraries_to_link.name}"],
-                                      expand_if_false = "libraries_to_link.is_whole_archive",
-                                  ),
-                                  flag_group(
-                                      flags = ["/WHOLEARCHIVE:%{libraries_to_link.name}"],
-                                      expand_if_true = "libraries_to_link.is_whole_archive",
-                                  ),
-                                ],
-                                expand_if_equal = variable_with_value(
-                                    name = "libraries_to_link.type",
-                                    value = "static_library",
-                                ),
-                            ),
-                        ],
-                        expand_if_available = "libraries_to_link",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    fastbuild_feature = feature(
-        name = "fastbuild",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/Od", "/Z7"])],
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [
-                    flag_group(
-                        flags = ["/DEBUG:FASTLINK", "/INCREMENTAL:NO"],
-                    ),
-                ],
-            ),
-        ],
-        implies = ["generate_pdb_file"],
-    )
-
-    user_compile_flags_feature = feature(
-        name = "user_compile_flags",
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flags = ["%{user_compile_flags}"],
-                        iterate_over = "user_compile_flags",
-                        expand_if_available = "user_compile_flags",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    archiver_flags_feature = feature(
-        name = "archiver_flags",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.cpp_link_static_library],
-                flag_groups = [
-                    flag_group(
-                        flags = ["/OUT:%{output_execpath}"],
-                        expand_if_available = "output_execpath",
-                    ),
-                    flag_group(
-                        flags = ["/MACHINE:X64"]
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    default_link_flags_feature = feature(
-        name = "default_link_flags",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [flag_group(flags = ["/MACHINE:X64"])],
-            ),
-         ],
-    )
-
-    static_link_msvcrt_feature = feature(name = "static_link_msvcrt")
-
-    dynamic_link_msvcrt_debug_feature = feature(
-        name = "dynamic_link_msvcrt_debug",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/MDd"])],
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [flag_group(flags = ["/DEFAULTLIB:msvcrtd.lib"])],
-            ),
-        ],
-        requires = [feature_set(features = ["dbg"])],
-    )
-
-    dbg_feature = feature(
-        name = "dbg",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/Od", "/Z7"])],
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [
-                  flag_group(
-                      flags = ["/DEBUG:FULL", "/INCREMENTAL:NO"],
-                  ),
-                ],
-            ),
-        ],
-        implies = ["generate_pdb_file"],
-    )
-
-    opt_feature = feature(
-        name = "opt",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/O2"])],
-            ),
-        ],
-        implies = ["frame_pointer"],
-    )
-
-    supports_interface_shared_libraries_feature = feature(
-        name = "supports_interface_shared_libraries",
-        enabled = True,
-    )
-
-    user_link_flags_feature = feature(
-        name = "user_link_flags",
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [
-                    flag_group(
-                        flags = ["%{user_link_flags}"],
-                        iterate_over = "user_link_flags",
-                        expand_if_available = "user_link_flags",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    default_compile_flags_feature = feature(
-        name = "default_compile_flags",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.linkstamp_compile,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.lto_backend,
-                    ACTION_NAMES.clif_match,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flags = [
-                            "/DCOMPILER_MSVC",
-                            "/DNOMINMAX",
-                            "/D_WIN32_WINNT=0x0601",
-                            "/D_CRT_SECURE_NO_DEPRECATE",
-                            "/D_CRT_SECURE_NO_WARNINGS",
-                            "/bigobj",
-                            "/Zm500",
-                            "/EHsc",
-                            "/wd4351",
-                            "/wd4291",
-                            "/wd4250",
-                            "/wd4996",
-                        ],
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    msvc_compile_env_feature = feature(
-        name = "msvc_compile_env",
-        env_sets = [
-            env_set(
-                actions = [
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                ],
-                env_entries = [env_entry(key = "INCLUDE", value = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt;C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared;C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um;C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt;")],
-            ),
-        ],
-    )
-
-    preprocessor_defines_feature = feature(
-        name = "preprocessor_defines",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flags = ["/D%{preprocessor_defines}"],
-                        iterate_over = "preprocessor_defines",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    generate_pdb_file_feature = feature(
-        name = "generate_pdb_file",
-        requires = [
-            feature_set(features = ["dbg"]),
-            feature_set(features = ["fastbuild"]),
-        ],
-    )
-
-    output_execpath_flags_feature = feature(
-        name = "output_execpath_flags",
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [
-                    flag_group(
-                        flags = ["/OUT:%{output_execpath}"],
-                        expand_if_available = "output_execpath",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    dynamic_link_msvcrt_no_debug_feature = feature(
-        name = "dynamic_link_msvcrt_no_debug",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/MD"])],
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [flag_group(flags = ["/DEFAULTLIB:msvcrt.lib"])],
-            ),
-          ],
-          requires = [
-              feature_set(features = ["fastbuild"]),
-              feature_set(features = ["opt"]),
-          ],
-    )
-
-    disable_assertions_feature = feature(
-        name = "disable_assertions",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/DNDEBUG"])],
-                with_features = [with_feature_set(features = ["opt"])],
-            ),
-        ],
-    )
-
-    has_configured_linker_path_feature = feature(name = "has_configured_linker_path")
-
-    supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
-
-    no_stripping_feature = feature(name = "no_stripping")
-
-    linker_param_file_feature = feature(
-        name = "linker_param_file",
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions +
-                          [ACTION_NAMES.cpp_link_static_library],
-                flag_groups = [
-                    flag_group(
-                        flags = ["@%{linker_param_file}"],
-                        expand_if_available = "linker_param_file",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    ignore_noisy_warnings_feature = feature(
-        name = "ignore_noisy_warnings",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.cpp_link_static_library],
-                flag_groups = [flag_group(flags = ["/ignore:4221"])],
-            ),
-        ],
-    )
-
-    no_legacy_features_feature = feature(name = "no_legacy_features")
-
-    parse_showincludes_feature = feature(
-        name = "parse_showincludes",
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                ],
-                flag_groups = [flag_group(flags = ["/showIncludes"])],
-            ),
-        ],
-    )
-
-    static_link_msvcrt_no_debug_feature = feature(
-        name = "static_link_msvcrt_no_debug",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/MT"])],
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [flag_group(flags = ["/DEFAULTLIB:libcmt.lib"])],
-            ),
-        ],
-        requires = [
-            feature_set(features = ["fastbuild"]),
-            feature_set(features = ["opt"]),
-        ],
-    )
-
-    treat_warnings_as_errors_feature = feature(
-        name = "treat_warnings_as_errors",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/WX"])],
-            ),
-        ],
-    )
-
-    windows_export_all_symbols_feature = feature(name = "windows_export_all_symbols")
-
-    no_windows_export_all_symbols_feature = feature(name = "no_windows_export_all_symbols")
-
-    include_paths_feature = feature(
-        name = "include_paths",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flags = ["/I%{quote_include_paths}"],
-                        iterate_over = "quote_include_paths",
-                    ),
-                    flag_group(
-                        flags = ["/I%{include_paths}"],
-                        iterate_over = "include_paths",
-                    ),
-                    flag_group(
-                        flags = ["/I%{system_include_paths}"],
-                        iterate_over = "system_include_paths",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    linkstamps_feature = feature(
-        name = "linkstamps",
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [
-                    flag_group(
-                        flags = ["%{linkstamp_paths}"],
-                        iterate_over = "linkstamp_paths",
-                        expand_if_available = "linkstamp_paths",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    targets_windows_feature = feature(
-        name = "targets_windows",
-        enabled = True,
-        implies = ["copy_dynamic_libraries_to_binary"],
-    )
-
-    linker_subsystem_flag_feature = feature(
-        name = "linker_subsystem_flag",
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [flag_group(flags = ["/SUBSYSTEM:CONSOLE"])],
-            ),
-        ],
-    )
-
-    static_link_msvcrt_debug_feature = feature(
-        name = "static_link_msvcrt_debug",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/MTd"])],
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [flag_group(flags = ["/DEFAULTLIB:libcmtd.lib"])],
-            ),
-        ],
-        requires = [feature_set(features = ["dbg"])],
-    )
-
-    frame_pointer_feature = feature(
-        name = "frame_pointer",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/Oy-"])],
-            ),
-        ],
-    )
-
-    compiler_output_flags_feature = feature(
-        name = "compiler_output_flags",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.assemble],
-                flag_groups = [
-                  flag_group(
-                      flag_groups = [
-                          flag_group(
-                              flags = ["/Fo%{output_file}", "/Zi"],
-                              expand_if_available = "output_file",
-                              expand_if_not_available = "output_assembly_file",
-                          ),
-                      ],
-                      expand_if_not_available = "output_preprocess_file",
-                  ),
-                ],
-            ),
-            flag_set(
-                actions = [
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flag_groups = [
-                            flag_group(
-                                flags = ["/Fo%{output_file}"],
-                                expand_if_not_available = "output_preprocess_file",
-                            ),
-                        ],
-                        expand_if_available = "output_file",
-                        expand_if_not_available = "output_assembly_file",
-                    ),
-                    flag_group(
-                        flag_groups = [
-                            flag_group(
-                                flags = ["/Fa%{output_file}"],
-                                expand_if_available = "output_assembly_file",
-                            ),
-                        ],
-                        expand_if_available = "output_file",
-                    ),
-                    flag_group(
-                        flag_groups = [
-                            flag_group(
-                                flags = ["/P", "/Fi%{output_file}"],
-                                expand_if_available = "output_preprocess_file",
-                            ),
-                        ],
-                        expand_if_available = "output_file",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    nologo_feature = feature(
-        name = "nologo",
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.cpp_link_executable,
-                    ACTION_NAMES.cpp_link_dynamic_library,
-                    ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-                    ACTION_NAMES.cpp_link_static_library,
-                ],
-                flag_groups = [flag_group(flags = ["/nologo"])],
-            ),
-        ],
-    )
-
-    smaller_binary_feature = feature(
-        name = "smaller_binary",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [flag_group(flags = ["/Gy", "/Gw"])],
-                with_features = [with_feature_set(features = ["opt"])],
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [flag_group(flags = ["/OPT:ICF", "/OPT:REF"])],
-                with_features = [with_feature_set(features = ["opt"])],
-            ),
-        ],
-    )
-
-    compiler_input_flags_feature = feature(
-        name = "compiler_input_flags",
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                ],
-                flag_groups = [
-                    flag_group(
-                        flags = ["/c", "%{source_file}"],
-                        expand_if_available = "source_file",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    def_file_feature = feature(
-        name = "def_file",
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = [
-                    flag_group(
-                        flags = ["/DEF:%{def_file_path}", "/ignore:4070"],
-                        expand_if_available = "def_file_path",
-                    ),
-                ],
-            ),
-        ],
-    )
-
-    msvc_env_feature = feature(
-        name = "msvc_env",
-        env_sets = [
-            env_set(
-                actions = [
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.cpp_link_executable,
-                    ACTION_NAMES.cpp_link_dynamic_library,
-                    ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-                    ACTION_NAMES.cpp_link_static_library,
-                ],
-                env_entries = [
-                    env_entry(key = "PATH", value = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x64;C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x86;;C:\\Windows\\system32"),
-                    env_entry(key = "TMP", value = "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp"),
-                    env_entry(key = "TEMP", value = "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp"),
-                ],
-            ),
-        ],
-        implies = ["msvc_compile_env", "msvc_link_env"],
-    )
-
-    features = [
-        no_legacy_features_feature,
-        nologo_feature,
-        has_configured_linker_path_feature,
-        no_stripping_feature,
-        targets_windows_feature,
-        copy_dynamic_libraries_to_binary_feature,
-        default_compile_flags_feature,
-        msvc_env_feature,
-        msvc_compile_env_feature,
-        msvc_link_env_feature,
-        include_paths_feature,
-        preprocessor_defines_feature,
-        parse_showincludes_feature,
-        generate_pdb_file_feature,
-        shared_flag_feature,
-        linkstamps_feature,
-        output_execpath_flags_feature,
-        archiver_flags_feature,
-        input_param_flags_feature,
-        linker_subsystem_flag_feature,
-        user_link_flags_feature,
-        default_link_flags_feature,
-        linker_param_file_feature,
-        static_link_msvcrt_feature,
-        static_link_msvcrt_no_debug_feature,
-        dynamic_link_msvcrt_no_debug_feature,
-        static_link_msvcrt_debug_feature,
-        dynamic_link_msvcrt_debug_feature,
-        dbg_feature,
-        fastbuild_feature,
-        opt_feature,
-        frame_pointer_feature,
-        disable_assertions_feature,
-        determinism_feature,
-        treat_warnings_as_errors_feature,
-        smaller_binary_feature,
-        ignore_noisy_warnings_feature,
-        user_compile_flags_feature,
-        sysroot_feature,
-        unfiltered_compile_flags_feature,
-        compiler_param_file_feature,
-        compiler_output_flags_feature,
-        compiler_input_flags_feature,
-        def_file_feature,
-        windows_export_all_symbols_feature,
-        no_windows_export_all_symbols_feature,
-        supports_dynamic_linker_feature,
-        supports_interface_shared_libraries_feature,
-    ]
-
-    artifact_name_patterns = [
-        artifact_name_pattern(
-            category_name = "object_file",
-            prefix = "",
-            extension = ".obj",
-        ),
-        artifact_name_pattern(
-            category_name = "static_library",
-            prefix = "",
-            extension = ".lib",
-        ),
-        artifact_name_pattern(
-            category_name = "alwayslink_static_library",
-            prefix = "",
-            extension = ".lo.lib",
-        ),
-        artifact_name_pattern(
-            category_name = "executable",
-            prefix = "",
-            extension = ".exe",
-        ),
-        artifact_name_pattern(
-            category_name = "dynamic_library",
-            prefix = "",
-            extension = ".dll",
-        ),
-        artifact_name_pattern(
-            category_name = "interface_library",
-            prefix = "",
-            extension = ".if.lib",
-        ),
-    ]
-
-    make_variables = []
-
-    tool_paths = [
-        tool_path(name = "ar", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/lib.exe"),
-        tool_path(name = "ml", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/ml64.exe"),
-        tool_path(name = "cpp", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe"),
-        tool_path(name = "gcc", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe"),
-        tool_path(name = "gcov", path = "wrapper/bin/msvc_nop.bat"),
-        tool_path(name = "ld", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe"),
-        tool_path(name = "nm", path = "wrapper/bin/msvc_nop.bat"),
-        tool_path(
-            name = "objcopy",
-            path = "wrapper/bin/msvc_nop.bat",
-        ),
-        tool_path(
-            name = "objdump",
-            path = "wrapper/bin/msvc_nop.bat",
-        ),
-        tool_path(
-            name = "strip",
-            path = "wrapper/bin/msvc_nop.bat",
-        ),
-    ]
-
-    return cc_common.create_cc_toolchain_config_info(
-        ctx = ctx,
-        features = features,
-        action_configs = action_configs,
-        artifact_name_patterns = artifact_name_patterns,
-        cxx_builtin_include_directories = cxx_builtin_include_directories,
-        toolchain_identifier = toolchain_identifier,
-        host_system_name = host_system_name,
-        target_system_name = target_system_name,
-        target_cpu = target_cpu,
-        target_libc = target_libc,
-        compiler = compiler,
-        abi_version = abi_version,
-        abi_libc_version = abi_libc_version,
-        tool_paths = tool_paths,
-        make_variables = make_variables,
-        builtin_sysroot = builtin_sysroot,
-        cc_target_os = None,
-    )
-
-def _windows_msys_mingw_impl(ctx):
-    toolchain_identifier = "msys_x64_mingw"
-    host_system_name = "local"
-    target_system_name = "local"
-    target_cpu = "x64_windows"
-    target_libc = "mingw"
-    compiler = "mingw-gcc"
-    abi_version = "local"
-    abi_libc_version = "local"
-    cc_target_os = None
-    builtin_sysroot = None
-    action_configs = []
-
-    targets_windows_feature = feature(
-        name = "targets_windows",
-        implies = ["copy_dynamic_libraries_to_binary"],
-        enabled = True,
-    )
-
-    copy_dynamic_libraries_to_binary_feature = feature(name= "copy_dynamic_libraries_to_binary")
-
-    gcc_env_feature = feature(
-        name = "gcc_env",
-        enabled = True,
-        env_sets = [
-            env_set (
-                actions = [
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.cpp_link_executable,
-                    ACTION_NAMES.cpp_link_dynamic_library,
-                    ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-                    ACTION_NAMES.cpp_link_static_library,
-                ],
-                env_entries = [
-                    env_entry(key = "PATH", value = "c:/tools/msys64/mingw64/bin")
-                ],
-            ),
-        ],
-    )
-
-    msys_mingw_flags = [
- "-std=gnu++0x"
-    ]
-    msys_mingw_link_flags = [
- "-lstdc++"
-    ]
-
-    default_compile_flags_feature = feature(
-        name = "default_compile_flags",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.linkstamp_compile,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.lto_backend,
-                    ACTION_NAMES.clif_match,
-                ],
-            ),
-            flag_set(
-                actions = [
-                    ACTION_NAMES.linkstamp_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.lto_backend,
-                    ACTION_NAMES.clif_match,
-                ],
-                flag_groups = ([flag_group(flags = msys_mingw_flags)] if msys_mingw_flags else []),
-            ),
-        ],
-    )
-
-    compiler_param_file_feature = feature(
-        name = "compiler_param_file",
-    )
-
-    default_link_flags_feature = feature(
-        name = "default_link_flags",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = ([flag_group(flags = msys_mingw_link_flags)] if msys_mingw_link_flags else []),
-            ),
-        ],
-    )
-
-    supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
-
-    features = [
-        targets_windows_feature,
-        copy_dynamic_libraries_to_binary_feature,
-        gcc_env_feature,
-        default_compile_flags_feature,
-        compiler_param_file_feature,
-        default_link_flags_feature,
-        supports_dynamic_linker_feature,
-    ]
-
-    cxx_builtin_include_directories = [
-        # This is a workaround for https://github.com/bazelbuild/bazel/issues/5087.
-        "C:\\botcode\\w",
-        "c:/tools/msys64/mingw64/",
-        "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE",
-        "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt"
-    ]
-
-    artifact_name_patterns = [
-        artifact_name_pattern(
-            category_name = "executable",
-            prefix = "",
-            extension = ".exe",
-        ),
-    ]
-
-    make_variables = []
-    tool_paths = [
-        tool_path (name= "ar", path= "c:/tools/msys64/mingw64/bin/ar"),
-        tool_path (name= "compat-ld", path= "c:/tools/msys64/mingw64/bin/ld"),
-        tool_path (name= "cpp", path= "c:/tools/msys64/mingw64/bin/cpp"),
-        tool_path (name= "dwp", path= "c:/tools/msys64/mingw64/bin/dwp"),
-        tool_path (name= "gcc", path= "c:/tools/msys64/mingw64/bin/gcc"),
-        tool_path (name= "gcov", path= "c:/tools/msys64/mingw64/bin/gcov"),
-        tool_path (name= "ld", path= "c:/tools/msys64/mingw64/bin/ld"),
-        tool_path (name= "nm", path= "c:/tools/msys64/mingw64/bin/nm"),
-        tool_path (name= "objcopy", path= "c:/tools/msys64/mingw64/bin/objcopy"),
-        tool_path (name= "objdump", path= "c:/tools/msys64/mingw64/bin/objdump"),
-        tool_path (name= "strip", path= "c:/tools/msys64/mingw64/bin/strip"),
-
-    ]
-
-    return cc_common.create_cc_toolchain_config_info(
-        ctx = ctx,
-        features = features,
-        action_configs = action_configs,
-        artifact_name_patterns = artifact_name_patterns,
-        cxx_builtin_include_directories = cxx_builtin_include_directories,
-        toolchain_identifier = toolchain_identifier,
-        host_system_name = host_system_name,
-        target_system_name = target_system_name,
-        target_cpu = target_cpu,
-        target_libc = target_libc,
-        compiler = compiler,
-        abi_version = abi_version,
-        abi_libc_version = abi_libc_version,
-        tool_paths = tool_paths,
-        make_variables = make_variables,
-        builtin_sysroot = builtin_sysroot,
-        cc_target_os = cc_target_os)
-
-
-def _armeabi_impl(ctx):
-    toolchain_identifier = "stub_armeabi-v7a"
-    host_system_name = "armeabi-v7a"
-    target_system_name = "armeabi-v7a"
-    target_cpu = "armeabi-v7a"
-    target_libc = "armeabi-v7a"
-    compiler = "compiler"
-    abi_version = "armeabi-v7a"
-    abi_libc_version = "armeabi-v7a"
-    cc_target_os = None
-    builtin_sysroot = None
-    action_configs = []
-
-    supports_pic_feature = feature(name = "supports_pic", enabled = True)
-    supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
-    features = [supports_dynamic_linker_feature, supports_pic_feature]
-
-    cxx_builtin_include_directories = [
-        # This is a workaround for https://github.com/bazelbuild/bazel/issues/5087.
-        "C:\\botcode\\w",]
-    artifact_name_patterns = []
-    make_variables = []
-
-    tool_paths = [
-        tool_path(name = "ar", path = "/bin/false"),
-        tool_path(name = "compat-ld", path = "/bin/false"),
-        tool_path(name = "cpp", path = "/bin/false"),
-        tool_path(name = "dwp", path = "/bin/false"),
-        tool_path(name = "gcc", path = "/bin/false"),
-        tool_path(name = "gcov", path = "/bin/false"),
-        tool_path(name = "ld", path = "/bin/false"),
-        tool_path(name = "nm", path = "/bin/false"),
-        tool_path(name = "objcopy", path = "/bin/false"),
-        tool_path(name = "objdump", path = "/bin/false"),
-        tool_path(name = "strip", path = "/bin/false"),
-    ]
-
-    return cc_common.create_cc_toolchain_config_info(
-        ctx = ctx,
-        features = features,
-        action_configs = action_configs,
-        artifact_name_patterns = artifact_name_patterns,
-        cxx_builtin_include_directories = cxx_builtin_include_directories,
-        toolchain_identifier = toolchain_identifier,
-        host_system_name = host_system_name,
-        target_system_name = target_system_name,
-        target_cpu = target_cpu,
-        target_libc = target_libc,
-        compiler = compiler,
-        abi_version = abi_version,
-        abi_libc_version = abi_libc_version,
-        tool_paths = tool_paths,
-        make_variables = make_variables,
-        builtin_sysroot = builtin_sysroot,
-        cc_target_os = cc_target_os
-    )
-
-def _impl(ctx):
-    if ctx.attr.cpu == "armeabi-v7a":
-        return _armeabi_impl(ctx)
-    elif ctx.attr.cpu == "x64_windows" and ctx.attr.compiler == "msvc-cl":
-        return _windows_msvc_impl(ctx)
-    elif ctx.attr.cpu == "x64_windows" and ctx.attr.compiler == "mingw-gcc":
-        return _windows_msys_mingw_impl(ctx)
-
-    tool_paths = [
-        tool_path (name= "ar", path= "c:/tools/msys64/usr/bin/ar"),
-        tool_path (name= "compat-ld", path= "c:/tools/msys64/usr/bin/ld"),
-        tool_path (name= "cpp", path= "c:/tools/msys64/usr/bin/cpp"),
-        tool_path (name= "dwp", path= "c:/tools/msys64/usr/bin/dwp"),
-        tool_path (name= "gcc", path= "c:/tools/msys64/usr/bin/gcc"),
-        tool_path (name= "gcov", path= "c:/tools/msys64/usr/bin/gcov"),
-        tool_path (name= "ld", path= "c:/tools/msys64/usr/bin/ld"),
-        tool_path (name= "nm", path= "c:/tools/msys64/usr/bin/nm"),
-        tool_path (name= "objcopy", path= "c:/tools/msys64/usr/bin/objcopy"),
-        tool_path (name= "objdump", path= "c:/tools/msys64/usr/bin/objdump"),
-        tool_path (name= "strip", path= "c:/tools/msys64/usr/bin/strip"),
-
-    ]
-
-    cxx_builtin_include_directories = [
-        # This is a workaround for https://github.com/bazelbuild/bazel/issues/5087.
-        "C:\\botcode\\w",
-        "c:/tools/msys64/usr/",
-        "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE",
-        "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um",
-        "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt"
-    ]
-
-    action_configs = []
-
-    compile_flags = [
-        
-    ]
-
-    dbg_compile_flags = [
-        
-    ]
-
-    opt_compile_flags = [
-        
-    ]
-
-    cxx_flags = [
-        "-std=gnu++0x"
-    ]
-
-    link_flags = [
-        "-lstdc++"
-    ]
-
-    opt_link_flags = [
-        
-    ]
-
-    unfiltered_compile_flags = [
-        
-    ]
-
-    targets_windows_feature = feature(
-        name = "targets_windows",
-        implies = ["copy_dynamic_libraries_to_binary"],
-        enabled = True,
-    )
-
-    copy_dynamic_libraries_to_binary_feature = feature(name= "copy_dynamic_libraries_to_binary")
-
-    gcc_env_feature = feature(
-        name = "gcc_env",
-        enabled = True,
-        env_sets = [
-            env_set (
-                actions = [
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.cpp_link_executable,
-                    ACTION_NAMES.cpp_link_dynamic_library,
-                    ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-                    ACTION_NAMES.cpp_link_static_library,
-                ],
-                env_entries = [
-                    env_entry(key = "PATH", value = "c:/tools/msys64/usr/bin")
-                ],
-            ),
-        ],
-    )
-
-    windows_features = [
-        targets_windows_feature,
-        copy_dynamic_libraries_to_binary_feature,
-        gcc_env_feature,
-    ]
-
-    
-
-    supports_pic_feature = feature(
-        name = "supports_pic",
-        enabled = True,
-    )
-    supports_start_end_lib_feature = feature(
-        name = "supports_start_end_lib",
-        enabled = True,
-    )
-
-    default_compile_flags_feature = feature(
-        name = "default_compile_flags",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.linkstamp_compile,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.lto_backend,
-                    ACTION_NAMES.clif_match,
-                ],
-                flag_groups = ([flag_group(flags = compile_flags)] if compile_flags else []),
-            ),
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.linkstamp_compile,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.lto_backend,
-                    ACTION_NAMES.clif_match,
-                ],
-                flag_groups = ([flag_group(flags = dbg_compile_flags)] if dbg_compile_flags else []),
-                with_features = [with_feature_set(features = ["dbg"])],
-            ),
-            flag_set(
-                actions = [
-                    ACTION_NAMES.assemble,
-                    ACTION_NAMES.preprocess_assemble,
-                    ACTION_NAMES.linkstamp_compile,
-                    ACTION_NAMES.c_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.lto_backend,
-                    ACTION_NAMES.clif_match,
-                ],
-                flag_groups = ([flag_group(flags = opt_compile_flags)] if opt_compile_flags else []),
-                with_features = [with_feature_set(features = ["opt"])],
-            ),
-            flag_set(
-                actions = [
-                    ACTION_NAMES.linkstamp_compile,
-                    ACTION_NAMES.cpp_compile,
-                    ACTION_NAMES.cpp_header_parsing,
-                    ACTION_NAMES.cpp_module_compile,
-                    ACTION_NAMES.cpp_module_codegen,
-                    ACTION_NAMES.lto_backend,
-                    ACTION_NAMES.clif_match,
-                ],
-                flag_groups = ([flag_group(flags = cxx_flags)] if cxx_flags else []),
-            ),
-        ],
-    )
-
-    default_link_flags_feature = feature(
-        name = "default_link_flags",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = ([flag_group(flags = link_flags)] if link_flags else []),
-            ),
-            flag_set(
-                actions = all_link_actions,
-                flag_groups = ([flag_group(flags = opt_link_flags)] if opt_link_flags else []),
-                with_features = [with_feature_set(features = ["opt"])],
-            ),
-        ],
-    )
-
-    dbg_feature = feature(name = "dbg")
-
-    opt_feature = feature(name = "opt")
-
-    sysroot_feature = feature(
-        name = "sysroot",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [
-                  ACTION_NAMES.preprocess_assemble,
-                  ACTION_NAMES.linkstamp_compile,
-                  ACTION_NAMES.c_compile,
-                  ACTION_NAMES.cpp_compile,
-                  ACTION_NAMES.cpp_header_parsing,
-                  ACTION_NAMES.cpp_module_compile,
-                  ACTION_NAMES.cpp_module_codegen,
-                  ACTION_NAMES.lto_backend,
-                  ACTION_NAMES.clif_match,
-                  ACTION_NAMES.cpp_link_executable,
-                  ACTION_NAMES.cpp_link_dynamic_library,
-                  ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-                ],
-                flag_groups = [
-                  flag_group(
-                      flags = ["--sysroot=%{sysroot}"],
-                      expand_if_available = "sysroot",
-                  ),
-                ],
-            ),
-        ],
-    )
-
-    fdo_optimize_feature = feature(
-        name = "fdo_optimize",
-        flag_sets = [
-            flag_set(
-                actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
-                flag_groups = [
-                  flag_group(
-                      flags = [
-                        "-fprofile-use=%{fdo_profile_path}",
-                        "-fprofile-correction",
-                      ],
-                      expand_if_available = "fdo_profile_path",
-                  ),
-                ],
-            ),
-        ],
-        provides = ["profile"],
-    )
-
-    supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
-
-    user_compile_flags_feature = feature(
-        name = "user_compile_flags",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [
-                  ACTION_NAMES.assemble,
-                  ACTION_NAMES.preprocess_assemble,
-                  ACTION_NAMES.linkstamp_compile,
-                  ACTION_NAMES.c_compile,
-                  ACTION_NAMES.cpp_compile,
-                  ACTION_NAMES.cpp_header_parsing,
-                  ACTION_NAMES.cpp_module_compile,
-                  ACTION_NAMES.cpp_module_codegen,
-                  ACTION_NAMES.lto_backend,
-                  ACTION_NAMES.clif_match,
-                ],
-                flag_groups = [
-                  flag_group(
-                      flags = ["%{user_compile_flags}"],
-                      iterate_over = "user_compile_flags",
-                      expand_if_available = "user_compile_flags",
-                  ),
-                ],
-            ),
-          ],
-    )
-
-    unfiltered_compile_flags_feature = feature(
-        name = "unfiltered_compile_flags",
-        enabled = True,
-        flag_sets = [
-            flag_set(
-                actions = [
-                  ACTION_NAMES.assemble,
-                  ACTION_NAMES.preprocess_assemble,
-                  ACTION_NAMES.linkstamp_compile,
-                  ACTION_NAMES.c_compile,
-                  ACTION_NAMES.cpp_compile,
-                  ACTION_NAMES.cpp_header_parsing,
-                  ACTION_NAMES.cpp_module_compile,
-                  ACTION_NAMES.cpp_module_codegen,
-                  ACTION_NAMES.lto_backend,
-                  ACTION_NAMES.clif_match,
-                ],
-                flag_groups = ([flag_group(flags = unfiltered_compile_flags)] if unfiltered_compile_flags else []),
-            ),
-        ],
-    )
-
-    features = windows_features + [
-        supports_pic_feature,
-        
-        
-        default_compile_flags_feature,
-        default_link_flags_feature,
-        fdo_optimize_feature,
-        supports_dynamic_linker_feature,
-        dbg_feature,
-        opt_feature,
-        user_compile_flags_feature,
-        sysroot_feature,
-        unfiltered_compile_flags_feature,
-    ]
-
-    artifact_name_patterns = [
-        artifact_name_pattern(category_name="executable", prefix="", extension=".exe"),
-    ]
-
-    make_variables = []
-
-    return cc_common.create_cc_toolchain_config_info(
-        ctx = ctx,
-        features = features,
-        action_configs = action_configs,
-        artifact_name_patterns = artifact_name_patterns,
-        cxx_builtin_include_directories = cxx_builtin_include_directories,
-        toolchain_identifier = "msys_x64",
-        host_system_name = "local",
-        target_system_name = "local",
-        target_cpu = "x64_windows",
-        target_libc = "msys",
-        compiler = "msys-gcc",
-        abi_version = "local",
-        abi_libc_version = "local",
-        tool_paths = tool_paths,
-        make_variables = make_variables,
-        builtin_sysroot = "",
-        cc_target_os = None,
-    )
-
-cc_toolchain_config = rule(
-    implementation = _impl,
-    attrs = {
-        "cpu" : attr.string(mandatory = True),
-        "compiler": attr.string(),
-    },
-    provides = [CcToolchainConfigInfo],
-)
-
diff --git a/third_party/toolchains/machine_size/BUILD b/third_party/toolchains/machine_size/BUILD
deleted file mode 100644
index cc962946c31..00000000000
--- a/third_party/toolchains/machine_size/BUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2018 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-licenses(["notice"])  # Apache v2
-
-package(default_visibility = ["//visibility:public"])
-
-constraint_setting(name = "machine_size")
-
-constraint_value(
-    name = "large",
-    constraint_setting = ":machine_size",
-)
-
-constraint_value(
-    name = "standard",
-    constraint_setting = ":machine_size",
-)
-
-# Add other constraint values as needed (tiny, huge, etc.) in the future.
diff --git a/third_party/twisted.BUILD b/third_party/twisted.BUILD
deleted file mode 100644
index 5005c5a3f8c..00000000000
--- a/third_party/twisted.BUILD
+++ /dev/null
@@ -1,15 +0,0 @@
-py_library(
-    name = "twisted",
-    srcs = glob(["src/twisted/**/*.py"]),
-    imports = [
-        "src",
-    ],
-    visibility = [
-        "//visibility:public",
-    ],
-    deps = [
-        "@com_github_twisted_incremental//:incremental",
-        "@com_github_twisted_constantly//:constantly",
-        "@com_github_zopefoundation_zope_interface//:zope_interface",
-    ],
-)
diff --git a/third_party/udpa b/third_party/udpa
deleted file mode 160000
index 94324803a49..00000000000
--- a/third_party/udpa
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 94324803a497c8f76dbc78df393ef629d3a9f3c3
diff --git a/third_party/yaml.BUILD b/third_party/yaml.BUILD
deleted file mode 100644
index f88854c5719..00000000000
--- a/third_party/yaml.BUILD
+++ /dev/null
@@ -1,10 +0,0 @@
-py_library(
-    name = "yaml",
-    srcs = glob(["lib/yaml/*.py"]),
-    imports = [
-        "lib",
-    ],
-    visibility = [
-        "//visibility:public",
-    ],
-)
diff --git a/third_party/zlib b/third_party/zlib
deleted file mode 160000
index cacf7f1d4e3..00000000000
--- a/third_party/zlib
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f
diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD
deleted file mode 100644
index 95ae7c5a89c..00000000000
--- a/third_party/zlib.BUILD
+++ /dev/null
@@ -1,36 +0,0 @@
-cc_library(
-    name = "zlib",
-    srcs = [
-        "adler32.c",
-        "compress.c",
-        "crc32.c",
-        "deflate.c",
-        "infback.c",
-        "inffast.c",
-        "inflate.c",
-        "inftrees.c",
-        "trees.c",
-        "uncompr.c",
-        "zutil.c",
-    ],
-    hdrs = [
-        "crc32.h",
-        "deflate.h",
-        "gzguts.h",
-        "inffast.h",
-        "inffixed.h",
-        "inflate.h",
-        "inftrees.h",
-        "trees.h",
-        "zconf.h",
-        "zlib.h",
-        "zutil.h",
-    ],
-    includes = [
-        ".",
-    ],
-    linkstatic = 1,
-    visibility = [
-        "//visibility:public",
-    ],
-)
diff --git a/third_party/zope_interface.BUILD b/third_party/zope_interface.BUILD
deleted file mode 100644
index b7b8d1e6cf1..00000000000
--- a/third_party/zope_interface.BUILD
+++ /dev/null
@@ -1,13 +0,0 @@
-py_library(
-    name = "zope_interface",
-    srcs = glob([
-        "src/zope/interface/*.py",
-        "src/zope/interface/common/*.py",
-    ]),
-    imports = [
-        "src",
-    ],
-    visibility = [
-        "//visibility:public",
-    ],
-)
