-
Notifications
You must be signed in to change notification settings - Fork 17
/
.bazelrc
27 lines (24 loc) · 1.44 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
# Bazel doesn't need more than 200MB of memory for local build based on memory profiling:
# https://docs.bazel.build/versions/master/skylark/performance.html#memory-profiling
# The default JVM max heapsize is 1/4 of physical memory up to 32GB which could be large
# enough to consume all memory constrained by cgroup in large host.
# Limiting JVM heapsize here to let it do GC more when approaching the limit to
# leave room for compiler/linker.
# The number 2G is chosen heuristically to both support large VM and small VM with RBE.
# Startup options cannot be selected via config.
startup --host_jvm_args=-Xmx4g
build --host_force_python=PY3
build --host_javabase=@bazel_tools//tools/jdk:remote_jdk11
build --javabase=@bazel_tools//tools/jdk:remote_jdk11
# https://docs.bazel.build/versions/main/command-line-reference.html#flag--enable_platform_specific_config
# If true, Bazel picks up host-OS-specific config lines from bazelrc files. For example, if the host OS is Linux and
# you run bazel build, Bazel picks up lines starting with build:linux. Supported OS identifiers are linux, macos,
# windows, freebsd, and openbsd. Enabling this flag is equivalent to using --config=linux on Linux,
# --config=windows on Windows, etc.
build --enable_platform_specific_config
# Pass PATH, CC, CXX and LLVM_CONFIG variables from the environment.
build --action_env=CC
build --action_env=CXX
build --action_env=LD_LIBRARY_PATH
build --action_env=LLVM_CONFIG
build --action_env=PATH