Skip to content

Commit a090c12

Browse files
committed
Add config for ASAN builds.
Enables ASAN builds with e.g. bazel -c opt --config=asan <targets>
1 parent db8f471 commit a090c12

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/.bazelrc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
# Enable Bzlmod for every Bazel command
22
common --enable_bzlmod
3-
common --cxxopt=-std=c++20
3+
common --cxxopt=-std=c++20
4+
5+
# Options to build with address sanitizer support.
6+
#
7+
# Example usage:
8+
# bazel build -c dbg --config=asan <targets>
9+
build:asan --strip=never
10+
build:asan --copt -fsanitize=address
11+
build:asan --copt -DADDRESS_SANITIZER
12+
build:asan --copt -D_GLIBCXX_SANITIZE_VECTOR
13+
build:asan --copt -O1
14+
build:asan --copt -g
15+
build:asan --copt -fno-omit-frame-pointer
16+
build:asan --linkopt -fsanitize=address

0 commit comments

Comments
 (0)