-
Notifications
You must be signed in to change notification settings - Fork 3
/
.bazelrc
51 lines (39 loc) · 2.26 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2023 Intrinsic Innovation LLC
# Enable Bzlmod for every Bazel command
common --enable_bzlmod
# Custom downloader configs. This makes it so that external URLs to download dependencies from
# can be rewritten at build time and, for example, support custom mirrors.
common --experimental_downloader_config=bazel/content_mirror/permissive.cfg
common:strict_mirror --experimental_downloader_config=bazel/content_mirror/strict.cfg
# Static linking to workaround OpenCV symbol lookup errors: https://github.com/bazelbuild/rules_foreign_cc/issues/1164
build --dynamic_mode=off
# Java toolchain
build --java_runtime_version=remotejdk_11
# Always use the pre-configured toolchain.
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# Use C++20.
build --cxxopt='-std=c++20'
# Use a static value for `PATH` and does not inherit `LD_LIBRARY_PATH`. Doesn't let environment
# variables like `PATH` sneak into the build, which can cause massive cache misses when they change.
# Use `--action_env=ENV_VARIABLE` if you want to inherit specific environment variables from the
# client, but note that doing so can prevent cross-user caching if a shared cache is used.
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env
build --incompatible_strict_action_env
# Silences spurious warnings like:
# `bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc/external/com_github_grpc_grpc: warning: directory does not exist`
build --incompatible_generated_protos_in_virtual_imports
build --incompatible_default_to_explicit_init_py
# Set a higher timeout value, just in case.
build --remote_timeout=3600
# BUG: https://github.com/bazelbuild/bazel/issues/20886
# Without this flag, our rules_foreign_cc/cmake builds fail with
# "The associated file is either missing or is an invalid symlink."
# on Bazel 7 or later as the default was flipped in Bazel 7.
build --noincompatible_sandbox_hermetic_tmp
# Enable absl support in googletest. If this define is set, googletest's default
# main function initializes absl, including the command line flag subsystem.
#
# See https://github.com/google/googletest/issues/2883#issuecomment-647540343
build --define absl=1
# Avoid building grpc with xDS support to reduce build time
build --define=grpc_no_xds=true