Skip to content

Commit 7418837

Browse files
devversionandrewseguin
authored andcommitted
build: ensure correct toolchains used for remote execution (#18803)
Currently the toolchains used for RBE are dependent on the current platform. This breaks because there is no darwin toolchain. We need to instruct Bazel to use the k8 linux toolchains when running builds remotely. (cherry picked from commit e3d2051)
1 parent e26670f commit 7418837

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.bazelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ build:remote --project_id=internal-200822
7676
# Needed due to: https://github.com/bazelbuild/bazel/issues/7254
7777
build:remote --define=EXECUTOR=remote
7878

79+
# For remote execution, we use the `ubuntu16_04_clang` toolchain configurations. These only
80+
# support `k8` or `armeabi-v7a`. Since we run on remotely with `k8` containers, we need to
81+
# ensure that the proper CPU is configured so that the correct toolchain can be used.
82+
# https://github.com/bazelbuild/bazel-toolchains/blob/master/configs/ubuntu16_04_clang/10.0.0/bazel_2.1.0/cc/BUILD#L50
83+
build:remote --cpu=k8
84+
build:remote --host_cpu=k8
85+
7986
# Setup the remote build execution servers.
8087
build:remote --remote_cache=remotebuildexecution.googleapis.com
8188
build:remote --remote_executor=remotebuildexecution.googleapis.com

0 commit comments

Comments
 (0)