Merge branch 'stable-2.14' into stable-2.15

* stable-2.14:
  .bazelrc: Update 'strict_action_env' flag
  Bazel: Bump rules_closure to 3.10.0-rc1
  Bazel: Remove duplicate bazel_toolchains fetching

Change-Id: I6eac644991769f61930928743937c5fb8cec2d0a
diff --git a/.bazelrc b/.bazelrc
index d6d4ce6..433a190 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,10 +1,16 @@
 build --workspace_status_command=./tools/workspace-status.sh --strategy=Closure=worker
 build --repository_cache=~/.gerritcodereview/bazel-cache/repository
-build --experimental_strict_action_env
 build --action_env=PATH
 build --disk_cache=~/.gerritcodereview/bazel-cache/cas
 build --java_toolchain //tools:error_prone_warnings_toolchain
 
+# Enable strict_action_env flag to. For more information on this feature see
+# https://groups.google.com/forum/#!topic/bazel-discuss/_VmRfMyyHBk.
+# This will be the new default behavior at some point (and the flag was flipped
+# shortly in 0.21.0 - https://github.com/bazelbuild/bazel/issues/7026). Remove
+# this flag here once flipped in Bazel again.
+build --incompatible_strict_action_env
+
 test --build_tests_only
 test --test_output=errors
 
diff --git a/WORKSPACE b/WORKSPACE
index fff3bfb..c2ac050 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -23,23 +23,6 @@
 rbe_autoconfig(name = "rbe_default")
 
 http_archive(
-    name = "bazel_toolchains",
-    sha256 = "88e818f9f03628eef609c8429c210ecf265ffe46c2af095f36c7ef8b1855fef5",
-    strip_prefix = "bazel-toolchains-92dd8a7a518a2fb7ba992d47c8b38299fe0be825",
-    urls = [
-        "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz",
-        "https://github.com/bazelbuild/bazel-toolchains/archive/92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz",
-    ],
-)
-
-load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
-
-# Creates a default toolchain config for RBE.
-# Use this as is if you are using the rbe_ubuntu16_04 container,
-# otherwise refer to RBE docs.
-rbe_autoconfig(name = "rbe_default")
-
-http_archive(
     name = "bazel_skylib",
     sha256 = "2ea8a5ed2b448baf4a6855d3ce049c4c452a6470b1efd1504fdb7c1c134d220a",
     strip_prefix = "bazel-skylib-0.8.0",
@@ -48,9 +31,9 @@
 
 http_archive(
     name = "io_bazel_rules_closure",
-    sha256 = "d075b084e6f4109d1b1ab877495ac72c1a6c4dbc593980967e0b7359f4254d7e",
-    strip_prefix = "rules_closure-78f1192664acf66ca1de24116cbcc98e1698f26b",
-    urls = ["https://github.com/bazelbuild/rules_closure/archive/78f1192664acf66ca1de24116cbcc98e1698f26b.tar.gz"],
+    sha256 = "39b7bec43e6178d065875987b18623d476acd54f355d7711ce9dce4a3eec0795",
+    strip_prefix = "rules_closure-0.25",
+    urls = ["https://github.com/davido/rules_closure/archive/v0.25.tar.gz"],
 )
 
 # File is specific to Polymer and copied from the Closure Github -- should be
@@ -72,6 +55,17 @@
 
 check_bazel_version()
 
+# Protobuf rules support
+http_archive(
+    name = "rules_proto",
+    sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208",
+    strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313",
+    urls = [
+        "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
+        "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
+    ],
+)
+
 # Rules Python
 http_archive(
     name = "rules_python",
@@ -84,7 +78,7 @@
 
 py_repositories()
 
-load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")
+load("@io_bazel_rules_closure//closure:repositories.bzl", "closure_repositories")
 
 # Prevent redundant loading of dependencies.
 closure_repositories(
@@ -92,6 +86,8 @@
     omit_args4j = True,
     omit_bazel_skylib = True,
     omit_javax_inject = True,
+    omit_rules_cc = True,
+    omit_rules_java = True,
 )
 
 ANTLR_VERS = "3.5.2"