Skip to content

Commit

Permalink
bazel: add a few flags to --config=clang-msan. (envoyproxy#16603)
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
  • Loading branch information
PiotrSikora authored May 20, 2021
1 parent c63cbab commit 02f3162
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ build:clang-msan --config=sanitizer
build:clang-msan --define ENVOY_CONFIG_MSAN=1
build:clang-msan --copt -fsanitize=memory
build:clang-msan --linkopt -fsanitize=memory
build:clang-msan --linkopt -fuse-ld=lld
build:clang-msan --copt -fsanitize-memory-track-origins=2
build:clang-msan --test_env=MSAN_SYMBOLIZER_PATH
# MSAN needs -O1 to get reasonable performance.
build:clang-msan --copt -O1
build:clang-msan --copt -fno-optimize-sibling-calls

# Clang with libc++
build:libc++ --config=clang
Expand Down
1 change: 1 addition & 0 deletions bazel/external/wee8.genrule_cmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ if [[ $${ENVOY_UBSAN_VPTR-} == "1" ]]; then
fi
if [[ $${ENVOY_MSAN-} == "1" ]]; then
WEE8_BUILD_ARGS+=" is_msan=true"
WEE8_BUILD_ARGS+=" msan_track_origins=2"
export LDFLAGS="$${LDFLAGS} -L/opt/libcxx_msan/lib -Wl,-rpath,/opt/libcxx_msan/lib"
fi
if [[ $${ENVOY_TSAN-} == "1" ]]; then
Expand Down

0 comments on commit 02f3162

Please sign in to comment.