Repository navigation
Expand file tree
/
Copy path.bazelrc
More file actions
163 lines (149 loc) · 9.2 KB
/
Copy path.bazelrc
File metadata and controls
163 lines (149 loc) · 9.2 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Windows otherwise copies every file in runfiles and dependency link trees,
# duplicating the Rust sysroot and rlibs until the runner disk is exhausted.
startup --windows_enable_symlinks
common --enable_bzlmod
common --announce_rc
common --show_progress_rate_limit=15
# The shared fleet CAS uses size-based eviction, so it cannot guarantee
# Bazel's default three-hour retention. Revalidate remote outputs before reuse.
build --experimental_remote_cache_ttl=0s
# Cargo reads the unstable acquisition policy during repository evaluation.
common --repo_env=RUSTC_BOOTSTRAP=1
# Opt out of aspect_tools_telemetry's usage upload (and its per-build notice).
common --repo_env=DO_NOT_TRACK=1
# Python targets get only the __init__.py files the tree actually contains;
# rules_python deprecated synthesizing them (bazel-contrib/rules_python#2945).
build --incompatible_default_to_explicit_init_py
# MODULE.bazel registers the pinned stable compiler.
# Hosts can extend this repository profile with their private fleet settings.
build --config=tracedecay
build:tracedecay --@rules_rust//rust/toolchain/channel=stable
build --incompatible_enable_cc_toolchain_resolution
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build --workspace_status_command=scripts/bazel/workspace_status.sh
# Bazel runs the status command through cmd.exe, which reads a forward slash
# as a switch (`scripts /bazel/...`), so the Windows path uses backslashes.
build:windows --workspace_status_command=scripts\\bazel\\workspace_status.bat
# .cargo/config.toml compiles vendored C deps with NDEBUG. Keep parity for
# cc crates built inside cargo_build_script actions (tree-sitter grammars).
# rules_rust replaces a build script's CFLAGS/CXXFLAGS with the C toolchain's
# own arguments, so the flags travel as HOST_ and TARGET_ variants, which
# cc-rs appends to them; it reads HOST_ for native builds, TARGET_ for cross.
build --action_env=HOST_CFLAGS=-DNDEBUG
build --action_env=TARGET_CFLAGS=-DNDEBUG
build --action_env=HOST_CXXFLAGS=-DNDEBUG
build --action_env=TARGET_CXXFLAGS=-DNDEBUG
build:linux "--@rules_rust//rust/settings:extra_rustc_flag=-Csplit-debuginfo=unpacked"
# Skip LLVM bitcode in rlibs. Thin LTO (dist) re-enables it below; other
# configs never ran LTO, so the bitcode was paid compile cost with no
# optimization benefit.
build "--@rules_rust//rust/settings:extra_rustc_flag=-Cembed-bitcode=no"
# MSVC encodes narrow string literals in the host ANSI code page unless told
# otherwise, so tree-sitter grammars that spell symbol names as universal
# character names become invalid UTF-8 (see .cargo/config.toml).
build:windows "--action_env=HOST_CFLAGS=-DNDEBUG /utf-8"
build:windows "--action_env=TARGET_CFLAGS=-DNDEBUG /utf-8"
build:windows "--action_env=HOST_CXXFLAGS=-DNDEBUG /utf-8"
build:windows "--action_env=TARGET_CXXFLAGS=-DNDEBUG /utf-8"
# Genrules run Git Bash under a stripped PATH that holds no Python; hand
# actions the runner's PATH, as Linux and macOS find python3 in /usr/bin.
build:windows --action_env=PATH
# Windows runfiles default to a manifest; suites read fixtures and spawn
# binaries through the runfiles tree.
build:windows --enable_runfiles
# Git for Windows exports its installation root to Git Bash. Preserve gix's
# native discovery fast path in tests instead of launching Git per hook.
test:windows --test_env=EXEPATH
test --test_output=errors
# Suites spawn child services as well as the bounded Rust test harness.
# Reserve the local host budget so independent suites do not oversubscribe it.
test --default_test_resources=cpu=HOST_CPUS
# Blocking Clippy policy over every Rust target, matching
# `cargo clippy --workspace --all-targets -- -D warnings`.
build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
# Lint outputs need dependency metadata, not linked test executables.
build:clippy --output_groups=clippy_checks
# Lint against full Rust libraries, the same artifacts the test lanes build
# and cache. Pipelined metadata for asupersync ef8b34a ran past the remote
# executor's timeout on Linux CI (over 1200s, against about 350s for the full
# rlib and about a minute for the metadata locally on macOS).
build:clippy --@rules_rust//rust/settings:pipelined_compilation=false
build:clippy --@rules_rust//rust/settings:clippy_flag=-Dwarnings
build:clippy --@rules_rust//rust/settings:clippy.toml=//:clippy.toml
# Default tests and their build-time tools use the assertion-enabled perf levels.
build --compilation_mode=fastbuild
build --host_compilation_mode=fastbuild
# Externals return to opt-level 3 over the perf overrides below.
build:release --compilation_mode=opt
build:release --host_compilation_mode=opt
build:release --@rules_rust//rust/settings:per_crate_rustc_flag=external/@-Copt-level=3
build:dist --compilation_mode=opt
build:dist --host_compilation_mode=opt
build:dist --@rules_rust//rust/settings:per_crate_rustc_flag=external/@-Copt-level=3
build:dist --@rules_rust//rust/settings:lto=thin
build:dist --@rules_rust//rust/settings:extra_rustc_flag=-Ccodegen-units=1
build:dist --@rules_rust//rust/settings:extra_rustc_flag=-Cstrip=symbols
# Last -C embed-bitcode wins; thin LTO needs the bitcode the generic build
# flag above turned off.
build:dist --@rules_rust//rust/settings:extra_rustc_flag=-Cembed-bitcode=yes
# Hosted CI: keep going past one failure so a run reports every red target.
build:ci --keep_going
build:ci --show_timestamps
test:ci --test_summary=short
# Suites spawn host tools such as ast-grep, node, and git.
test:ci --test_env=PATH
# MSVC's fastbuild feature implies generate_pdb_file, so disable that feature
# instead of rejecting its implied PDB output. Retain its unoptimized compile
# and non-incremental link settings without /Z7 or /DEBUG:FASTLINK. Rust keeps
# compilation_mode=fastbuild; explicit dbg builds retain their debug feature.
build:ci-windows --config=ci
build:ci-windows --features=-fastbuild
build:ci-windows --host_features=-fastbuild
build:ci-windows --copt=/Od
build:ci-windows --host_copt=/Od
build:ci-windows --linkopt=/INCREMENTAL:NO
build:ci-windows --host_linkopt=/INCREMENTAL:NO
# BEGIN generated by scripts/bazel/gen_builds.py
# Cargo perf opt-levels for external crates (see [profile.perf]).
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__grafeo-adapters-0.5.43/@-Copt-level=2"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__grafeo-common-0.5.43/@-Copt-level=2"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__grafeo-core-0.5.43/@-Copt-level=2"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__grafeo-engine-0.5.43/@-Copt-level=2"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__grafeo-storage-0.5.43/@-Copt-level=2"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__regex-1.13.1/@-Copt-level=2"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__serde_json-1.0.154/@-Copt-level=2"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__sha2-0.10.9/@-Copt-level=3"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__sha2-0.11.1/@-Copt-level=3"
build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++crate+c__tiktoken-rs-0.12.1/@-Copt-level=2"
# END generated by scripts/bazel/gen_builds.py
# Platform configs expand here, after generic build defaults, so their
# workspace-status command and compiler environment take precedence.
build --enable_platform_specific_config
# Host profiles select compatible execution pools; .bazelrc.local can override
# individual checkouts. Private endpoints and capacity stay outside the repo.
# A fleet-enrolled workstation contributes through its NativeLink worker.
# Submit compilation and tests to the common scheduler so it accounts for
# local and remote worker capacity together, without racing a second local copy.
# Clients without a local worker (such as hosted CI) may override selected
# mnemonics with dynamic execution in their later .bazelrc.local profile.
build:fleet --strategy=Rustc=remote
build:fleet --strategy=TestRunner=remote
build:rbe-linux --host_platform=//scripts/bazel/platforms:linux_x86_64
build:rbe-linux --platforms=//scripts/bazel/platforms:linux_x86_64
build:rbe-linux --extra_toolchains=@zig_sdk//toolchain:linux_amd64_gnu.2.31
build:rbe-linux --sandbox_writable_path=/tmp/zig-cache
build:rbe-macos --host_platform=//scripts/bazel/platforms:macos_aarch64
build:rbe-macos --platforms=//scripts/bazel/platforms:macos_aarch64
build:rbe-windows --host_platform=//scripts/bazel/platforms:windows_x86_64
build:rbe-windows --platforms=//scripts/bazel/platforms:windows_x86_64
# Both hosts map their installed Visual Studio directory to V: without copying it.
build:rbe-windows --repo_env=BAZEL_VC=V:/VC
build:rbe-windows --repo_env=BAZEL_VC_FULL_VERSION=14.44.35207
build:rbe-windows --repo_env=BAZEL_WINSDK_FULL_VERSION=10.0.26100.0
# MSVC embeds TMP in its action environment. Keep linker scratch files in
# the action directory instead of carrying the CI runner's D: path remotely.
build:rbe-windows --repo_env=TMP=.
build:rbe-windows --repo_env=TEMP=.
build:rbe-windows --action_env=TMP=.
build:rbe-windows --action_env=TEMP=.
try-import %workspace%/.bazelrc.local