|
| 1 | +# Copyright 2016 The Bazel Authors. All rights reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# This file is auto-generated from release/bazelrc.tpl and should not be |
| 16 | +# modified directly. |
| 17 | + |
| 18 | +# This .bazelrc file contains all of the flags required for the provided |
| 19 | +# toolchain with Remote Build Execution. |
| 20 | +# |
| 21 | +# This .bazelrc file also contains all of the flags required for the local |
| 22 | +# docker sandboxing. |
| 23 | + |
| 24 | +# Depending on how many machines are in the remote execution instance, setting |
| 25 | +# this higher can make builds faster by allowing more jobs to run in parallel. |
| 26 | +# Setting it too high can result in jobs that timeout, however, while waiting |
| 27 | +# for a remote machine to execute them. |
| 28 | +build:remote --jobs=50 |
| 29 | + |
| 30 | +# Set several flags related to specifying the platform, toolchain and java |
| 31 | +# properties. |
| 32 | +# These flags are duplicated rather than imported from (for example) |
| 33 | +# %workspace%/configs/ubuntu16_04_clang/1.2/toolchain.bazelrc to make this |
| 34 | +# bazelrc a standalone file that can be copied more easily. |
| 35 | +# These flags should only be used as is for the rbe-ubuntu16-04 container |
| 36 | +# and need to be adapted to work with other toolchain containers. |
| 37 | +build:remote --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8 |
| 38 | +build:remote --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8 |
| 39 | +build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 |
| 40 | +build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 |
| 41 | +build:remote --crosstool_top=@bazel_toolchains//configs/ubuntu16_04_clang/1.2/bazel_0.24.0/default:toolchain |
| 42 | +build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 |
| 43 | +# Platform flags: |
| 44 | +# The toolchain container used for execution is defined in the target indicated |
| 45 | +# by "extra_execution_platforms", "host_platform" and "platforms". |
| 46 | +# If you are using your own toolchain container, you need to create a platform |
| 47 | +# target with "constraint_values" that allow for the toolchain specified with |
| 48 | +# "extra_toolchains" to be selected (given constraints defined in |
| 49 | +# "exec_compatible_with"). |
| 50 | +# More about platforms: https://docs.bazel.build/versions/master/platforms.html |
| 51 | +build:remote --extra_toolchains=@bazel_toolchains//configs/ubuntu16_04_clang/1.2/bazel_0.24.0/cpp:cc-toolchain-clang-x86_64-default |
| 52 | +build:remote --extra_execution_platforms=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:rbe_ubuntu1604 |
| 53 | +build:remote --host_platform=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:rbe_ubuntu1604 |
| 54 | +build:remote --platforms=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:rbe_ubuntu1604 |
| 55 | + |
| 56 | +# Set various strategies so that all actions execute remotely. Mixing remote |
| 57 | +# and local execution will lead to errors unless the toolchain and remote |
| 58 | +# machine exactly match the host machine. |
| 59 | +build:remote --spawn_strategy=remote |
| 60 | +build:remote --strategy=Javac=remote |
| 61 | +build:remote --strategy=Closure=remote |
| 62 | +build:remote --strategy=Genrule=remote |
| 63 | +build:remote --define=EXECUTOR=remote |
| 64 | + |
| 65 | +# Enable the remote cache so action results can be shared across machines, |
| 66 | +# developers, and workspaces. |
| 67 | +build:remote --remote_cache=remotebuildexecution.googleapis.com |
| 68 | + |
| 69 | +# Enable remote execution so actions are performed on the remote systems. |
| 70 | +build:remote --remote_executor=remotebuildexecution.googleapis.com |
| 71 | + |
| 72 | +# Enable encryption. |
| 73 | +build:remote --tls_enabled=true |
| 74 | + |
| 75 | +# Set a higher timeout value, just in case. |
| 76 | +build:remote --remote_timeout=3600 |
| 77 | + |
| 78 | +# Enable authentication. This will pick up application default credentials by |
| 79 | +# default. You can use --auth_credentials=some_file.json to use a service |
| 80 | +# account credential instead. |
| 81 | +build:remote --auth_enabled=true |
| 82 | + |
| 83 | +# The following flags are only necessary for local docker sandboxing |
| 84 | +# with the rbe-ubuntu16-04 container. Use of these flags is still experimental. |
| 85 | +build:docker-sandbox --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8 |
| 86 | +build:docker-sandbox --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8 |
| 87 | +build:docker-sandbox --crosstool_top=@bazel_toolchains//configs/ubuntu16_04_clang/1.2/bazel_0.24.0/default:toolchain |
| 88 | +build:docker-sandbox --experimental_docker_image=gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:da0f21c71abce3bbb92c3a0c44c3737f007a82b60f8bd2930abc55fe64fc2729 |
| 89 | +build:docker-sandbox --spawn_strategy=docker |
| 90 | +build:docker-sandbox --strategy=Javac=docker |
| 91 | +build:docker-sandbox --strategy=Closure=docker |
| 92 | +build:docker-sandbox --strategy=Genrule=docker |
| 93 | +build:docker-sandbox --define=EXECUTOR=remote |
| 94 | +build:docker-sandbox --experimental_docker_verbose |
| 95 | +build:docker-sandbox --experimental_enable_docker_sandbox |
| 96 | + |
| 97 | +# The following flags enable the remote cache so action results can be shared |
| 98 | +# across machines, developers, and workspaces. |
| 99 | +build:remote-cache --remote_cache=remotebuildexecution.googleapis.com |
| 100 | +build:remote-cache --tls_enabled=true |
| 101 | +build:remote-cache --remote_timeout=3600 |
| 102 | +build:remote-cache --auth_enabled=true |
| 103 | +build:remote-cache --spawn_strategy=standalone |
| 104 | +build:remote-cache --strategy=Javac=standalone |
| 105 | +build:remote-cache --strategy=Closure=standalone |
| 106 | +build:remote-cache --strategy=Genrule=standalone |
0 commit comments