-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Expand file tree
/
Copy path.bazelrc
More file actions
135 lines (104 loc) · 4.66 KB
/
.bazelrc
File metadata and controls
135 lines (104 loc) · 4.66 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
130
131
132
133
134
135
try-import %workspace%/.bazelrc.local
try-import %workspace%/.bazelrc.windows.local
# Enable bzlmod but without lockfile for a moment.
# Lockfile is a problem to check in at the moment
# because of constant Git conflicts and platform-specific
# pieces.
# https://github.com/bazelbuild/bazel/issues/20369
# https://github.com/bazelbuild/bazel/issues/21491
common --lockfile_mode=off
# Bazel 8 compatibility flags. We should find ways to avoid needing these
common --legacy_external_runfiles
# Ensure Windows support is accurate.
startup --windows_enable_symlinks
build --enable_runfiles
build --flag_alias=pin_browsers=//common:pin_browsers
build --flag_alias=headless=//common:headless
# Set the default java toolchain
build --java_language_version=21
build --java_runtime_version=remotejdk_21
build --tool_java_language_version=21
build --tool_java_runtime_version=remotejdk_21
# We target java 11 by default
build --javacopt="--release 11"
# Require java dependencies to be used and first-order
build --experimental_strict_java_deps=strict
build --explicit_java_test_deps
# Avoid ErrorProne getting annoyed about "impossible null checks"
build --javacopt="-Xep:ImpossibleNullComparison:OFF"
build --javacopt="-Xep:WildcardImport:ERROR"
# Allow spaces in runfile paths
build --nobuild_runfile_links
# More JS magic
build --allow_unresolved_symlinks
# Avoid a warning about directory tracking being unsound
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
# Required for faster TS builds
build --@aspect_rules_ts//ts:skipLibCheck=always
fetch --@aspect_rules_ts//ts:skipLibCheck=always
query --@aspect_rules_ts//ts:skipLibCheck=always
build --@aspect_rules_ts//ts:default_to_tsc_transpiler
fetch --@aspect_rules_ts//ts:default_to_tsc_transpiler
query --@aspect_rules_ts//ts:default_to_tsc_transpiler
# Ensure builds are unpolluted by the user env
build --incompatible_strict_action_env
# Required for prebuilt protoc to be used
common --@protobuf//bazel/toolchains:prefer_prebuilt_protoc=true
# Ensure that we don't accidentally build protobuf or gRPC
common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
common --host_per_file_copt=external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT
# Required to get `protobuf` compiling, which is required for `rules_closure`
common --incompatible_enable_proto_toolchain_resolution
build --incompatible_enable_cc_toolchain_resolution
build:linux --cxxopt=-std=c++17
build:linux --host_cxxopt=-std=c++17
build:macos --cxxopt=-std=c++17
build:macos --host_cxxopt=-std=c++17
build:windows --cxxopt=/std:c++17
build:windows --host_cxxopt=/std:c++17
build:windows --per_file_copt=external/protobuf\\+.*@/w
build:windows --host_per_file_copt=external/protobuf\\+.*@/w
common --define=protobuf_allow_msvc=true
# For build stamping
build --enable_platform_specific_config
build:linux --workspace_status_command=scripts/build-info.sh
build:macos --workspace_status_command=scripts/build-info.sh
build:windows --workspace_status_command="powershell.exe scripts/build-info.ps1"
# Make sure we get something helpful when tests fail
build --verbose_failures
build --test_output=errors
# pass environment variables to the test environment
test --test_env=CI
test --test_env=DASHBOARD_URL
test --test_env=DISPLAY
test --test_env=FIREFOX_NIGHTLY_BINARY
test --test_env=GITHUB_ACTIONS
test --test_env=MOZ_HEADLESS
test --test_env=SELENIUM_BROWSER
test --test_env=PYTHON_VERSION
test --test_env=SE_AVOID_STATS=true
# Remove once rules_ruby support proper $LOAD_PATH expansion.
test --test_env=RUBYOPT="-Irb/lib -w"
# Speed up JRuby startup.
# https://github.com/jruby/jruby/wiki/Improving-startup-time
build --action_env=JRUBY_OPTS="--dev"
test --test_env=JRUBY_OPTS="--dev"
# Expose necessary variables for Selenium-Manager.
test:windows --test_env=PATH
test:windows --test_env=LOCALAPPDATA
test:windows --test_env=PROCESSOR_ARCHITECTURE
test:windows --test_env=PROGRAMFILES="C:\\Program Files"
test:windows --test_env=PROGRAMFILES(X86)="C:\\Program Files (x86)"
test --test_timeout=1800
test:node_debug --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
test:ruby_debug --test_output=streamed --test_env=RUBY_DEBUG_FORK_MODE=parent --run_under="@bundle//bin:rdbg --nonstop --open --command"
build:release --stamp
build:release --compilation_mode=opt
# As regular `release` but all the build work happens on the RBE
build:rbe_release --config=release
build:rbe_release --config=rbe
build:rbe_release --remote_download_toplevel
# RBE
import %workspace%/.bazelrc.remote