Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ build:remote-ci --remote_executor=grpcs://remotebuildexecution.googleapis.com
# Fuzz builds
build:asan-fuzzer --config=clang-asan
build:asan-fuzzer --define=FUZZING_ENGINE=libfuzzer
build:asan-fuzzer --copt=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
build:asan-fuzzer --copt=-fsanitize=fuzzer-no-link
build:asan-fuzzer --copt=-fno-omit-frame-pointer
# Remove UBSAN halt_on_error to avoid crashing on protobuf errors.
Expand Down
7 changes: 4 additions & 3 deletions bazel/envoy_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def envoy_cc_fuzz_test(
srcs = tar_src,
testonly = 1,
)
fuzz_copts = ["-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"]
test_lib_name = name + "_lib"
envoy_cc_test_library(
name = test_lib_name,
Expand All @@ -105,7 +106,7 @@ def envoy_cc_fuzz_test(
)
native.cc_test(
name = name,
copts = envoy_copts("@envoy", test = True),
copts = fuzz_copts + envoy_copts("@envoy", test = True),
linkopts = _envoy_test_linkopts(),
linkstatic = 1,
args = ["$(locations %s)" % corpus_name],
Expand All @@ -129,7 +130,7 @@ def envoy_cc_fuzz_test(
# provide a path to FuzzingEngine.
native.cc_binary(
name = name + "_driverless",
copts = envoy_copts("@envoy", test = True),
copts = fuzz_copts + envoy_copts("@envoy", test = True),
linkopts = ["-lFuzzingEngine"] + _envoy_test_linkopts(),
linkstatic = 1,
testonly = 1,
Expand All @@ -139,7 +140,7 @@ def envoy_cc_fuzz_test(

native.cc_test(
name = name + "_with_libfuzzer",
copts = envoy_copts("@envoy", test = True),
copts = fuzz_copts + envoy_copts("@envoy", test = True),
linkopts = ["-fsanitize=fuzzer"] + _envoy_test_linkopts(),
linkstatic = 1,
testonly = 1,
Expand Down