-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
38 lines (30 loc) · 1.45 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
# See e.g. https://blog.aspect.dev/bazelrc-flags
build --noenable_bzlmod
# Fix the wrong default to generate __init__.py to delimit a Python package.
build --incompatible_default_to_explicit_init_py
# All code will be compiled with C++17 flag.
# NOTE: googletest >=v1.13.0 requires min C++14.
build --cxxopt=-std=c++17
# Ensure that you don't accidentally make non-hermetic actions/tests
# which depend on remote services. Tag an individual target with
# tags=["requires-network"] to opt-out of the enforcement.
build --sandbox_default_allow_network=false
# Don't let environment variables like $PATH sneak into the build,
# which can cause massive cache misses when they change.
build --incompatible_strict_action_env
# Helps debugging when Bazel runs out of memory
build --heap_dump_on_oom
# Speed up all builds by not checking if output files have been modified.
build --noexperimental_check_output_files
# Don't bother building targets which aren't dependencies of the tests.
test --build_tests_only
build:opt -c opt
build:opt --copt=-O3
build:profile --config=opt
build:profile --copt=-g
# Load any settings specific to the current user.
# user.bazelrc should appear in .gitignore so that settings are not shared with
# team members. This needs to be last statement in this config,
# as the user configuration should be able to overwrite flags from this file.
# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc
try-import %workspace%/user.bazelrc