-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expand file tree
/
Copy path.bazelrc
More file actions
129 lines (107 loc) · 5.68 KB
/
Copy path.bazelrc
File metadata and controls
129 lines (107 loc) · 5.68 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
common --enable_platform_specific_config
common --@rules_python//python/config_settings:bootstrap_impl=script
# Either consumed as @remoteapis or as files.
common --deleted_packages=third_party/remoteapis
# Shared configuration flags to build and test Bazel on RBE.
common:remote_shared --remote_instance_name=projects/bazel-untrusted/instances/default_instance
common:remote_shared --remote_executor=grpcs://remotebuildexecution.googleapis.com
common:remote_shared --remote_download_toplevel
common:remote_shared --remote_timeout=600
common:remote_shared --google_default_credentials
common:remote_shared --jobs=100
common:remote_shared --action_env=PATH=/bin:/usr/bin:/usr/local/bin
# Configuration to build and test Bazel on RBE on Ubuntu 20.04
common:ubuntu2404 --extra_toolchains=@rbe_ubuntu2404//config:cc-toolchain
common:ubuntu2404 --extra_execution_platforms=//:rbe_ubuntu2404_platform,//:rbe_ubuntu2404_highcpu_platform
common:ubuntu2404 --host_platform=//:rbe_ubuntu2404_platform
common:ubuntu2404 --platforms=//:rbe_ubuntu2404_platform
common:ubuntu2404 --config=remote_shared
# Alias
common:remote --config=ubuntu2404
common:macos --host_macos_minimum_os=10.13
common:macos --macos_minimum_os=10.13
# grpc fails layering_check on macOS until the next update
common:macos --repo_env=APPLE_SUPPORT_LAYERING_CHECK_BETA=0
common:windows_arm64 --platforms=//:windows_arm64
common:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows
# Check direct Bazel module dependencies are up-to-date
common --check_direct_dependencies=error
# Add mirrors for certain download URLs
common --downloader_config=bazel_downloader.cfg
# Add BCR module mirrors
common --module_mirrors=https://bcr.cloudflaremirrors.com
# Some integration tests need the PATH environment variable set.
common --test_env=PATH
# Suppress warnings from external repos, we have no direct control on them anyway.
common:linux --per_file_copt=external/.*@-w
common:linux --host_per_file_copt=external/.*@-w
common:macos --per_file_copt=external/.*@-w
common:macos --host_per_file_copt=external/.*@-w
# Silence specific noisy warnings for external repos
# Note that we silence individual warnings here. This is tedious and brittle,
# but avoids the enormous log spam from passing /w or /W0 to MSVC, since that
# overrides the default /W3 warning level. MSVC creates even more warnings for
# this behavior.
common:windows --per_file_copt=external/.*@/wd4047,/wd4624,/wd4267,/wd4244,/wd4715,/wd4312,/wd4805,/wd4700,/wd4722
common:windows --host_per_file_copt=external/.*@/wd4047,/wd4624,/wd4267,/wd4244,/wd4715,/wd4312,/wd4805,/wd4700,/wd4722
# Enable Protobuf MSVC support on Windows
common:windows --define=protobuf_allow_msvc=true
# Build protoc from source instead of using the prebuilt binary so we can apply patches.
common --@com_google_protobuf//bazel/flags:prefer_prebuilt_protoc=false
# Enable Java 25 language features and compile for a Java 25 runtime, matching
# version of the embedded JDK.
# Keep in sync with //:java_toolchain_%d.
# LINT.IfChange
common --java_language_version=25
common --tool_java_language_version=25
common --java_runtime_version=remotejdk_25
common --tool_java_runtime_version=remotejdk_25
# LINT.ThenChange(//BUILD)
# Reduce the amount of warnings shown due to the deprecation of most Unsafe
# methods.
# TODO: Remove this after migrating more code to use VarHandles.
common --javacopt=-Xlint:-removal
common --host_javacopt=-Xlint:-removal
# Use a bootclasspath version matching the language version.
common --@rules_java//toolchains:incompatible_language_version_bootclasspath
# Fail if a classpath contains different versions of the same class
common --experimental_one_version_enforcement=ERROR
# User-specific .bazelrc
try-import %workspace%/user.bazelrc
common:docs --workspace_status_command=scripts/docs/get_workspace_status.sh
# Flags for CI builds
## Common
common:ci-common --lockfile_mode=error
common:ci-common --remote_download_minimal
common:ci-common --nobuild_runfile_links
common:ci-common --experimental_profile_include_target_label
## For Linux
common:ci-linux --config=ci-common
common:ci-linux --repository_cache=/var/lib/buildkite-agent/bazeltest/repo_cache
common:ci-linux --test_env=TEST_INSTALL_BASE=/var/lib/buildkite-agent/bazeltest/install_base
common:ci-linux --test_env=REPOSITORY_CACHE=/var/lib/buildkite-agent/bazeltest/repo_cache
common:ci-linux --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
test:ci-linux --sandbox_writable_path=/var/lib/buildkite-agent/bazeltest
test:ci-linux --sandbox_default_allow_network=false
## For macOS
common:ci-macos --config=ci-common
common:ci-macos --repository_cache=/Users/buildkite/bazeltest/repo_cache
common:ci-macos --experimental_collect_system_network_usage
common:ci-macos --test_env=TEST_INSTALL_BASE=/Users/buildkite/bazeltest/install_base
common:ci-macos --test_env=REPOSITORY_CACHE=/Users/buildkite/bazeltest/repo_cache
common:ci-macos --test_env=REMOTE_NETWORK_ADDRESS=bazel.build:80
test:ci-macos --sandbox_writable_path=/Users/buildkite/bazeltest
# TODO(pcloudy): Revert to false once https://github.com/bazelbuild/bazel/issues/23726 is resolved.
test:ci-macos --sandbox_default_allow_network=true
common:ci-macos --test_tag_filters=-no_macos
common:ci-macos --experimental_async_execution
common:ci-macos --experimental_async_execution_max_concurrent_actions=0
common:ci-macos --jobs=100
## For Windows
common:ci-windows --config=ci-common
common:ci-windows --repository_cache=C:/b/bazeltest_repo_cache
common:ci-windows --test_env=BAZEL_VC
common:ci-windows --test_env=JAVA_HOME
common:ci-windows --test_env=TEST_INSTALL_BASE=C:/b/bazeltest_install_base
common:ci-windows --test_env=REPOSITORY_CACHE=C:/b/bazeltest_repo_cache
common:ci-windows --test_tag_filters=-no_windows,-slow