xref: /aosp_15_r20/external/grpc-grpc/tools/fuzztest.bazelrc (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1### DO NOT EDIT. Generated file.
2#
3# To regenerate, run the following from your project's workspace:
4#
5#  bazel run @com_google_fuzztest//bazel:setup_configs > fuzztest.bazelrc
6#
7# And don't forget to add the following to your project's .bazelrc:
8#
9#  try-import %workspace%/fuzztest.bazelrc
10
11
12### Common options.
13#
14# Do not use directly.
15
16# Compile and link with Address Sanitizer (ASAN).
17build:fuzztest-common --linkopt=-fsanitize=address
18build:fuzztest-common --copt=-fsanitize=address
19
20# Standard define for "ifdef-ing" any fuzz test specific code.
21build:fuzztest-common --copt=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
22
23# In fuzz tests, we want to catch assertion violations even in optimized builds.
24build:fuzztest-common --copt=-UNDEBUG
25
26# Enable libc++ assertions.
27# See https://libcxx.llvm.org/UsingLibcxx.html#enabling-the-safe-libc-mode
28build:fuzztest-common --copt=-D_LIBCPP_ENABLE_ASSERTIONS=1
29
30
31### FuzzTest build configuration.
32#
33# Use with: --config=fuzztest
34
35build:fuzztest --config=fuzztest-common
36
37# Link statically.
38build:fuzztest --dynamic_mode=off
39
40# We rely on the following flag instead of the compiler provided
41# __has_feature(address_sanitizer) to know that we have an ASAN build even in
42# the uninstrumented runtime.
43build:fuzztest --copt=-DADDRESS_SANITIZER
44
45# We apply coverage tracking instrumentation to everything but the
46# FuzzTest framework itself (including GoogleTest and GoogleMock).
47build:fuzztest --per_file_copt=+//,-fuzztest/.*,-googletest/.*,-googlemock/.*@-fsanitize-coverage=inline-8bit-counters,-fsanitize-coverage=trace-cmp
48
49