Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: experiment with only applying ASAN and LSAN to Magma C files #12113

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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