-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathdart.bazelrc
More file actions
81 lines (71 loc) · 3.62 KB
/
dart.bazelrc
File metadata and controls
81 lines (71 loc) · 3.62 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
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# =============================================================================
# Dart Build Configuration
# =============================================================================
# -----------------------------------------------------------------------------
# Compilation Modes
# -----------------------------------------------------------------------------
build:release --compilation_mode=opt
build:debug --compilation_mode=dbg
# -----------------------------------------------------------------------------
# Sandboxing Strategy
# -----------------------------------------------------------------------------
# Use sandboxed execution with fallback to local for actions that don't support it
# This provides hermeticity while allowing CopyFile and similar actions to work
build --spawn_strategy=sandboxed,standalone
# Enable sandbox debugging (shows what's happening in the sandbox)
build:sandbox_debug --sandbox_debug
# -----------------------------------------------------------------------------
# Test Configuration
# -----------------------------------------------------------------------------
# Dart tests run 'pub get' inside the sandbox which can be network/IO bound
# Increase timeouts to prevent flakes on slower machines/CI
test --test_timeout=360,900,3600,10800
# Always show output on failure
test --test_output=errors
# -----------------------------------------------------------------------------
# Debugging
# -----------------------------------------------------------------------------
# When compiling in debug mode, preserve debugging information
build:dbg --copt="-g"
# Enable verbose failure logs to see script generation issues
build --verbose_failures
# Show subcommand output for debugging build actions
build:verbose --subcommands
# -----------------------------------------------------------------------------
# Platform & Toolchain
# -----------------------------------------------------------------------------
# Ensure correct platform resolution particularly for cross-compilation
build --incompatible_enable_cc_toolchain_resolution
# -----------------------------------------------------------------------------
# Worker Configuration
# -----------------------------------------------------------------------------
# Persistent workers are NOT currently implemented for Dart compilation.
# The config below is a placeholder for future implementation.
# Workers require a proper binary implementing the Bazel worker protocol
# (JSON requests/responses via stdin/stdout).
# TODO(#124): Implement proper persistent worker binary for Dart compilation.
#
# Usage (once implemented): bazel build --config=dart_worker //...
# build:dart_worker --strategy=DartCompile=worker
# build:dart_worker --worker_sandboxing
# -----------------------------------------------------------------------------
# Strict Mode (for CI - maximum hermeticity)
# -----------------------------------------------------------------------------
# Usage: bazel build --config=strict //...
build:strict --spawn_strategy=sandboxed
build:strict --experimental_strict_action_env