This repository was archived by the owner on May 24, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bazelrc
More file actions
103 lines (83 loc) 路 3.67 KB
/
Copy path.bazelrc
File metadata and controls
103 lines (83 loc) 路 3.67 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
# 馃尯馃挏 Violet.Subprocess: C++20 library for subprocesses in a cross-platform, secure way
# Copyright (c) 2025-2026 Noelware, LLC. <team@noelware.org>, et al.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# For `--config=dbg`, we set `--compilation_mode` to `dbg`
build:dbg --compilation_mode=dbg
# For `--config=opt`, we set `--compilation_mode` to `opt`
build:opt --compilation_mode=opt
build:opt --copt=-DNDEBUG
# For `.bazelrc`, we can specify platform-specific Bazel flags with this.
common --enable_platform_specific_config
# Requires for Windows usage
startup --windows_enable_symlinks
build:windows --enable_runfiles
# macOS: Set Apple SDK to 15.5
build:macos --macos_minimum_os=15.5
# macOS (C++): Disable modules as Violet doesn't support it (yet) on macOS.
build:macos --cxxopt=-fno-modules
# macOS (C++): Disable layering and header checks. At some point, I'll see why
# this doesn't work so we can have enable C++20 modules soon:tm:
build:macos --features=-layering_check
build:macos --features=-parse_headers
# `--config=libcxx` (C++): Enables compilation and linking with libc++
build:libcxx --cxxopt=-stdlib=libc++
build:libcxx --linkopt=-stdlib=libc++
build:libcxx --linkopt=-lc++
build:libcxx --linkopt=-lc++abi
# C++ (macOS, Linux): Disable warnings that are annoying
build:linux --cxxopt=-Wno-unused-command-line-argument
build:macos --cxxopt=-Wno-unused-command-line-argument
# --config=cxx20: Test with C++20 (Linux, macOS)
build:cxx20 --cxxopt=-std=c++20
build:cxx20 --host_cxxopt=-std=c++20
# --config=cxx23: Test with C++23 (Linux, macOS)
build:cxx23 --cxxopt=-std=c++23
build:cxx23 --host_cxxopt=-std=c++23
# --config=cxx26: Test with C++26 (Linux, macOS)
build:cxx26 --cxxopt=-std=c++26
build:cxx26 --host_cxxopt=-std=c++26
# Only show errors in test output
test --test_output=errors
# CI-based configuration
build:ci --nokeep_state_after_build
test:ci --test_output=all
common:ci --noshow_progress
common:ci --verbose_failures
## ~ common configuration for sanitizers
common:san --config=dbg
common:san --strip=never
common:san --copt=-O0
common:san --copt=-fno-omit-frame-pointer
## ~ `--config=asan` enables Address Sanitizer (ASan)
common:asan --config=san
common:asan --//bazel/flags:asan=True
## ~ `--config=msan` enables Memory Sanitizer (MSan)
common:msan --config=san
common:msan --config=libcxx
common:msan --//bazel/flags:msan=True
## ~ `--config=ubsan` enables Undefined Behaviour Sanitizer (UBSan)
common:ubsan --config=san
common:ubsan --linkopt=-lubsan
common:ubsan --//bazel/flags:ubsan=True
## ~ `--config=tsan` enables Thread Sanitizer (TSan)
common:tsan --config=san
common:tsan --//bazel/flags:tsan=True
# Import .usr.bazelrc if it exists
try-import %workspace%/.usr.bazelrc