-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bazelrc
39 lines (28 loc) · 1.36 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
# --repository_cache for fetched externals:
# "bazel caches all files downloaded in the repository cache which, by
# default, is located at ~/.cache/bazel/_bazel_$USER/cache/repos/v1/."
# However, on macOS, it is under /var/tmp instead; use this to check:
# bazel info repository_cache
# a bug currently prevents this from being used to share the
# repo cache among users:
# https://github.com/bazelbuild/bazel/issues/13848
# ----------------------------------------
# --disk_cache for build artifacts:
# The setting here shares the artifact cache among all workspaces with
# the same setting.
# There isn't a "bazel info disk_cache", probably because the default
# is per-workspace.
# There is an open issue to automatically manage the cache size.
# https://github.com/bazelbuild/bazel/issues/5139
# Some people use a "find blah blah blah -delete" cronjob to trim the
# cache, but this triggers hard-to-diagnose errors. See:
# https://github.com/bazelbuild/bazel/issues/12630
# Instead, "bazel clean" in a weekly or monthly cron if you don't want
# to notice and clean manually.
build --disk_cache=~/.cache/bazel-disk
fetch --disk_cache=~/.cache/bazel-disk
query --disk_cache=~/.cache/bazel-disk
sync --disk_cache=~/.cache/bazel-disk
test --disk_cache=~/.cache/bazel-disk
# For production use, consider Aspect's advice on many settings:
# https://blog.aspect.dev/bazelrc-flags