Skip to content

Commit

Permalink
chore: experiment with only applying ASAN and LSAN to Magma C files (#…
Browse files Browse the repository at this point in the history
…12113)

Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
themarwhal authored and ardzoht committed Mar 29, 2022
1 parent 01f16d5 commit 262d5a8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,14 @@ build:coverage --combined_report=lcov
build:coverage --instrumentation_filter="//(orc8r|lte)/gateway/(c|python)[/:],-//(orc8r|lte)/protos[/:],-/*/test[/:]"

# ASAN
build:asan --copt=-fsanitize=address
build:asan --copt=-fsanitize=undefined
build:asan --copt=-O0
build:asan --copt=-fno-omit-frame-pointer
build:asan --linkopt=-fsanitize=address
build:asan --linkopt=-fsanitize=undefined
build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always
build:asan --per_file_copt=^.*/gateway/c/.*$@-fsanitize=address,-fsanitize=undefined,-O0,-fno-omit-frame-pointer

# LSAN
build:lsan --copt=-fsanitize=leak
build:lsan --copt=-fno-omit-frame-pointer
build:lsan --linkopt=-fsanitize=leak
build:lsan --per_file_copt=^.*/gateway/c/.*$@-fsanitize=leak,-fno-omit-frame-pointer

# system bazelrc should include config specific to different build envs (--config=vm, --config=devcontainer, etc.)
try-import /etc/bazelrc

0 comments on commit 262d5a8

Please sign in to comment.