blob: 78b86d2ffa781b0398ceb2062689701da3557609 [file] [log] [blame]
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +02001# 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.
David Ostrovskybdc15ea2021-02-21 13:13:24 +010028build:remote --jobs=200
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020029build:remote --disk_cache=
30
31# Set several flags related to specifying the platform, toolchain and java
32# properties.
David Ostrovsky001943d2020-12-20 21:36:25 +010033build:remote --host_javabase=@rbe_jdk11//java:jdk
34build:remote --javabase=@rbe_jdk11//java:jdk
35build:remote --crosstool_top=@rbe_jdk11//cc:toolchain
36build:remote --extra_toolchains=@rbe_jdk11//config:cc-toolchain
37build:remote --extra_execution_platforms=@rbe_jdk11//config:platform
38build:remote --host_platform=@rbe_jdk11//config:platform
39build:remote --platforms=@rbe_jdk11//config:platform
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020040build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020041
42# Set various strategies so that all actions execute remotely. Mixing remote
43# and local execution will lead to errors unless the toolchain and remote
44# machine exactly match the host machine.
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020045build:remote --define=EXECUTOR=remote
46
47# Enable the remote cache so action results can be shared across machines,
48# developers, and workspaces.
49build:remote --remote_cache=remotebuildexecution.googleapis.com
50
51# Enable remote execution so actions are performed on the remote systems.
52build:remote --remote_executor=remotebuildexecution.googleapis.com
53
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020054# Set a higher timeout value, just in case.
55build:remote --remote_timeout=3600
56
57# Enable authentication. This will pick up application default credentials by
58# default. You can use --auth_credentials=some_file.json to use a service
59# account credential instead.
David Ostrovsky77181562021-02-19 13:01:07 +010060build:remote --google_default_credentials
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020061
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020062# The following flags enable the remote cache so action results can be shared
63# across machines, developers, and workspaces.
64build:remote-cache --remote_cache=remotebuildexecution.googleapis.com
65build:remote-cache --tls_enabled=true
66build:remote-cache --remote_timeout=3600
67build:remote-cache --auth_enabled=true