|
| 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 | +### Common options. |
| 12 | +# |
| 13 | +# Do not use directly. |
| 14 | + |
| 15 | +# Standard define for \"ifdef-ing\" any fuzz test specific code. |
| 16 | +build:fuzztest-common --copt=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION |
| 17 | + |
| 18 | +# In fuzz tests, we want to catch assertion violations even in optimized builds. |
| 19 | +build:fuzztest-common --copt=-UNDEBUG |
| 20 | + |
| 21 | +# Enable libc++ assertions. |
| 22 | +# See https://libcxx.llvm.org/UsingLibcxx.html#enabling-the-safe-libc-mode |
| 23 | +build:fuzztest-common --copt=-D_LIBCPP_ENABLE_ASSERTIONS=1 |
| 24 | + |
| 25 | +### ASan (Address Sanitizer) build configuration. |
| 26 | +# |
| 27 | +# Use with: --config=asan |
| 28 | + |
| 29 | +build:asan --linkopt=-fsanitize=address |
| 30 | +build:asan --copt=-fsanitize=address |
| 31 | + |
| 32 | +# We rely on the following flag instead of the compiler provided |
| 33 | +# __has_feature(address_sanitizer) to know that we have an ASAN build even in |
| 34 | +# the uninstrumented runtime. |
| 35 | +build:asan --copt=-DADDRESS_SANITIZER |
| 36 | + |
| 37 | +### FuzzTest build configuration. |
| 38 | +# |
| 39 | +# Use with: --config=fuzztest |
| 40 | +# |
| 41 | +# Note that this configuration includes the ASan configuration. |
| 42 | + |
| 43 | +build:fuzztest --config=asan |
| 44 | +build:fuzztest --config=fuzztest-common |
| 45 | + |
| 46 | +# Link statically. |
| 47 | +build:fuzztest --dynamic_mode=off |
| 48 | + |
| 49 | +# We apply coverage tracking instrumentation to everything but Centipede and the |
| 50 | +# FuzzTest framework itself (including GoogleTest and GoogleMock). |
| 51 | +build:fuzztest --copt=-fsanitize-coverage=inline-8bit-counters,trace-cmp,pc-table |
| 52 | +build:fuzztest --per_file_copt=common/.*,fuzztest/.*,centipede/.*,-centipede/.*fuzz_target,googletest/.*,googlemock/.*@-fsanitize-coverage=0 |
| 53 | + |
| 54 | +### Experimental FuzzTest build configuration. |
| 55 | +# |
| 56 | +# Use with: --config=fuzztest-experimental |
| 57 | +# |
| 58 | +# Use this instead of --config=fuzztest when building test binaries to run with |
| 59 | +# Centipede. Eventually, this will be consolidated with --config=fuzztest. |
| 60 | +# Note that this configuration doesn't include the ASan configuration. If you |
| 61 | +# want to use both, you can use --config=fuzztest-experimental --config=asan. |
| 62 | + |
| 63 | +build:fuzztest-experimental --config=fuzztest-common |
| 64 | +build:fuzztest-experimental --@com_google_fuzztest//fuzztest:centipede_integration |
| 65 | + |
| 66 | +# Generate line tables for debugging. |
| 67 | +build:fuzztest-experimental --copt=-gline-tables-only |
| 68 | +build:fuzztest-experimental --strip=never |
| 69 | + |
| 70 | +# Prevent memcmp & co from being inlined. |
| 71 | +build:fuzztest-experimental --copt=-fno-builtin |
| 72 | + |
| 73 | +# Disable heap checking. |
| 74 | +build:fuzztest-experimental --copt=-DHEAPCHECK_DISABLE |
| 75 | + |
| 76 | +# Link statically. |
| 77 | +build:fuzztest-experimental --dynamic_mode=off |
| 78 | + |
| 79 | +# We apply coverage tracking instrumentation to everything but Centipede and the |
| 80 | +# FuzzTest framework itself (including GoogleTest and GoogleMock). |
| 81 | +# TODO(b/374840534): Add -fsanitize-coverage=control-flow once we start building |
| 82 | +# with clang 16+. |
| 83 | +build:fuzztest-experimental --copt=-fsanitize-coverage=trace-pc-guard,pc-table,trace-loads,trace-cmp |
| 84 | +build:fuzztest-experimental --per_file_copt=common/.*,fuzztest/.*,centipede/.*,-centipede/.*fuzz_target,googletest/.*,googlemock/.*@-fsanitize-coverage=0 |
| 85 | + |
0 commit comments