Skip to content

Commit 236580a

Browse files
committed
chore: add .bazelrc with C++ toolchain resolution configuration
1 parent d9d70c9 commit 236580a

File tree

1 file changed

+12
-50
lines changed

1 file changed

+12
-50
lines changed

.bazelrc

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,22 @@
1-
# Bazel Configuration for File Operations Component
1+
# Bazel configuration for bazel-file-ops-component
22

3-
# Enable bzlmod (Bazel module system)
3+
# Enable modern features
44
common --enable_bzlmod
55

6-
# Build configuration
7-
build --incompatible_strict_action_env
8-
build --host_force_python=PY3
9-
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
10-
11-
# Enable platform-specific toolchain selection
6+
# Build settings - enable C++ toolchain resolution for Rust binaries
127
build --incompatible_enable_cc_toolchain_resolution
8+
build --enable_platform_specific_config
139

14-
# WebAssembly specific settings
15-
build:wasm --platforms=@platforms//cpu:wasm32
16-
build:wasm --incompatible_enable_cc_toolchain_resolution
17-
18-
# TinyGo WebAssembly builds
19-
build:tinygo --config=wasm
20-
build:tinygo --define=GOOS=wasip1
21-
build:tinygo --define=GOARCH=wasm
22-
23-
# Rust WebAssembly builds
24-
build:rust-wasm --config=wasm
25-
build:rust-wasm --@rules_rust//rust/settings:experimental_use_cc_common_link=True
26-
27-
# Test configuration
10+
# Test settings
2811
test --test_output=errors
2912
test --test_summary=detailed
30-
test --test_verbose_timeout_warnings
3113

32-
# Coverage configuration
33-
coverage --combined_report=lcov
34-
coverage --coverage_report_generator=@bazel_tools//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:Main
14+
# Platform-specific settings
15+
build:linux --copt=-fPIC
16+
build:macos --copt=-fPIC
3517

36-
# Documentation builds
37-
build:docs --@aspect_rules_js//js:node_options=--max-old-space-size=8192
18+
# Performance
19+
build --jobs=auto
3820

39-
# Performance optimizations
40-
build --experimental_reuse_sandbox_directories
41-
build --experimental_writable_outputs
42-
build --experimental_inmemory_jdeps_files
43-
build --experimental_inmemory_dotd_files
44-
45-
# Development settings
46-
build:dev --compilation_mode=fastbuild
47-
build:dev --strip=never
48-
build:dev --copt=-O0
49-
build:dev --copt=-g
50-
51-
# Release settings
52-
build:release --compilation_mode=opt
53-
build:release --strip=always
54-
build:release --copt=-O3
55-
build:release --copt=-DNDEBUG
56-
57-
# Security settings
58-
build --incompatible_run_shell_command_string=false
59-
60-
try-import %workspace%/.bazelrc.local
21+
# Environment isolation for hermetic builds
22+
build --incompatible_strict_action_env

0 commit comments

Comments
 (0)