Bazel configuration for RBE
Necessary configuration to allow building IREE with RBE. This should eventually allow much faster continuous builds.
With these changes, I am able to run:
`bazel test --config=rbe -- //iree/... -//iree/hal/vulkan:dynamic_symbols_test -//iree/samples/rt:bytecode_module_api_test`
and all tests pass. The two explicit excludes are tests that rely on vulkan (so are going to need a custom toolchain or GPU executors).
For now I'm the only one actually authorized to do that, but auth improvements coming soon :-D
I decided to unconditionally add the --experimental_guard_against_concurrent_changes and remove the advice to add it to user.bazelrc. I'm pretty sure this flag does nothing without some caching mechanism provided and is slated to be switched to default true anyway.
Closes #181
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/181 from google:rbe e89ee3bd5b017827c5acf5dc58a3eebbae717dd9
PiperOrigin-RevId: 285026356
diff --git a/WORKSPACE b/WORKSPACE
index 13a8c25..e36d56f 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -45,6 +45,24 @@
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
+
+###############################################################################
+
+###############################################################################
+# bazel toolchains rules for remote execution (https://releases.bazel.build/bazel-toolchains.html).
+http_archive(
+ name = "bazel_toolchains",
+ sha256 = "ca8aa49ceb47e9bee04dd67f0bec0b010032b37ebbe67147b535237e801d9a87",
+ strip_prefix = "bazel-toolchains-1.2.2",
+ urls = [
+ "https://github.com/bazelbuild/bazel-toolchains/releases/download/1.2.2/bazel-toolchains-1.2.2.tar.gz",
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/1.2.2.tar.gz",
+ ],
+)
+
+load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
+rbe_autoconfig(name = "rbe_default")
+
###############################################################################
###############################################################################