mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-24 00:17:37 +01:00
670c15777d
GitOrigin-RevId: 12444845fcf3173b9ffb38093fe71f5b30064302
70 lines
2.9 KiB
Plaintext
70 lines
2.9 KiB
Plaintext
# Reference docs: https://bazel.build/run/bazelrc
|
|
|
|
# This automatically sets a config based on host platform, ex: --config=macos if the host is macos
|
|
build --enable_platform_specific_config=true
|
|
|
|
# This makes builds more hermetic by preventing environment variables from leaking into the execution of rules
|
|
build --incompatible_strict_action_env=true
|
|
|
|
# allows us to use python rules. This is needed because of the bug:
|
|
# https://github.com/bazelbuild/bazel/issues/4327
|
|
build --nobuild_runfile_links
|
|
|
|
# cc_library transitively propagates link opts. The build uses cc_shared_library to avoid this when linking
|
|
# dynamically.
|
|
build --experimental_cc_shared_library
|
|
|
|
# This supports the "crosstool" feature (aka building from our toolchain).
|
|
# Currently the only platform with a custom toolchain config is linux, use the default
|
|
# toolchain_suite elsewhere.
|
|
build:linux --crosstool_top=@mongo_toolchain//:toolchain_suite
|
|
|
|
# Dynamic linking on Windows (DLL generation) is currently not supported.
|
|
build:windows --//bazel/config:linkstatic=True
|
|
|
|
# remote execution is the default, but only mongodb employees will be able to access
|
|
# the engflow cluster. External builders should use the local option below
|
|
# remote execution configs
|
|
build --remote_executor=grpcs://sodalite.cluster.engflow.com
|
|
build --remote_cache=grpcs://sodalite.cluster.engflow.com
|
|
build --bes_backend=grpcs://sodalite.cluster.engflow.com
|
|
build --bes_results_url=https://sodalite.cluster.engflow.com/invocation/
|
|
build --experimental_remote_cache_compression=true
|
|
build --grpc_keepalive_time=30s
|
|
build --nolegacy_important_outputs
|
|
|
|
# if you don't have access to the remote execution cluster above, use the local config
|
|
# described below.
|
|
# pass local config to SCons like:
|
|
# > buildscripts/scons.py BAZEL_FLAGS=--config=local <others args>
|
|
# or if invoking bazel directly pass "--config=local" on the bazel command line
|
|
--config=local
|
|
build:local --remote_executor=
|
|
build:local --remote_cache=
|
|
build:local --bes_backend=
|
|
build:local --bes_results_url=
|
|
build:local --tls_client_certificate=
|
|
build:local --tls_client_key=
|
|
build:local --experimental_remote_cache_compression=false
|
|
build:local --grpc_keepalive_time=0s
|
|
build:local --legacy_important_outputs
|
|
|
|
# Disable remote execution and caching for public releases
|
|
--config=public-release
|
|
build:public-release --remote_executor=
|
|
build:public-release --remote_cache=
|
|
build:public-release --bes_backend=
|
|
build:public-release --bes_results_url=
|
|
build:public-release --tls_client_certificate=
|
|
build:public-release --tls_client_key=
|
|
build:public-release --experimental_remote_cache_compression=false
|
|
build:public-release --grpc_keepalive_time=0s
|
|
build:public-release --legacy_important_outputs
|
|
|
|
|
|
# try to import the bazelrc files if available
|
|
try-import %workspace%/.bazelrc.local
|
|
|
|
# in evergreen this will set the key/cert options for access to the cluster
|
|
try-import %workspace%/.bazelrc.evergreen_engflow_creds
|