xref: /aosp_15_r20/external/grpc-grpc/tools/remote_build/linux.bazelrc (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1#@IgnoreInspection BashAddShebang
2# Copyright 2018 The gRPC Authors
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# bazelrc file for running gRPC tests with RBE (on Linux)
17
18import %workspace%/tools/remote_build/include/rbe_remote_execution.bazelrc
19
20# Next section is linux-specific RBE configuration
21build --crosstool_top=//third_party/toolchains:rbe_linux_default_toolchain_suite
22build --extra_toolchains=//third_party/toolchains:rbe_linux_default_cc_toolchain
23# Use custom execution platforms defined in third_party/toolchains
24build --extra_execution_platforms=//third_party/toolchains:rbe_linux_default_platform
25build --host_platform=//third_party/toolchains:rbe_linux_default_platform
26build --platforms=//third_party/toolchains:rbe_linux_default_platform
27
28# we assume the default bazel RBE build is on linux,
29# so filter out stuff that should not be built or run there.
30build --test_tag_filters=-no_linux
31build --build_tag_filters=-no_linux
32
33import %workspace%/tools/remote_build/include/test_config_common.bazelrc
34
35build --jobs=100
36
37build:opt --test_tag_filters=-noopt,-no_linux
38build:dbg --test_tag_filters=-nodbg,-no_linux
39
40# address sanitizer: most settings are already in %workspace%/.bazelrc
41# we only need a few additional ones that are Foundry specific
42build:asan --copt=-gmlt
43# use double the default value for "moderate" and "long" timeout as sanitizer
44# tests tend to be slower
45build:asan --test_timeout=60,600,1800,3600
46build:asan --test_tag_filters=-no_linux,-noasan,-qps_json_driver
47
48# memory sanitizer: most settings are already in %workspace%/.bazelrc
49# we only need a few additional ones that are Foundry specific
50build:msan --copt=-gmlt
51# "moderate" timeout 3x the default, "long" timeout 2x the default
52build:msan --test_timeout=60,900,1800,3600
53# TODO(jtattermusch): revisit the disabled tests
54build:msan --test_tag_filters=-no_linux,-nomsan,-json_run_localhost
55build:msan --cxxopt=--stdlib=libc++
56build:msan --linkopt=--stdlib=libc++
57# use MSAN-instrumented version of libc++
58# TODO(jtattermusch): include the modified LD_LIBRARY_PATH in an msan-specific
59# toolchain configuration, instead of needing to explicitly set it here.
60build:msan --action_env=LD_LIBRARY_PATH=/usr/local/libcxx-msan/lib/x86_64-unknown-linux-gnu
61
62# thread sanitizer: most settings are already in %workspace%/.bazelrc
63# we only need a few additional ones that are Foundry specific
64build:tsan --copt=-gmlt
65# use double the default value for "moderate" and "long" timeout as sanitizer
66# tests tend to be slower
67build:tsan --test_timeout=60,600,1800,3600
68build:tsan --test_tag_filters=-no_linux,-notsan,-qps_json_driver
69
70# undefined behavior sanitizer: most settings are already in %workspace%/.bazelrc
71# we only need a few additional ones that are Foundry specific
72build:ubsan --copt=-gmlt
73# use double the default value for "moderate" and "long" timeout as sanitizer
74# tests tend to be slower
75build:ubsan --test_timeout=60,600,1800,3600
76# RBE docker image only has a msan specific version of libc++, so to be able to link against it,
77# we need to involuntarily enable msan as well to be able to build. See b/200667821
78# TODO(jtattermusch): disable memory sanitizer for ubsan build as soon as possible.
79build:ubsan --copt=-fsanitize=memory
80build:ubsan --copt=-fsanitize-recover=memory
81build:ubsan --linkopt=-fsanitize=memory
82build:ubsan --cxxopt=--stdlib=libc++
83build:ubsan --action_env=MSAN_OPTIONS=halt_on_error=0
84build:ubsan --test_tag_filters=-no_linux,-noubsan
85# use MSAN-instrumented version of libc++
86# TODO(jtattermusch): run UBSAN without enabling MSAN too.
87build:ubsan --action_env=LD_LIBRARY_PATH=/usr/local/libcxx-msan/lib/x86_64-unknown-linux-gnu
88