load("@rules_cc//cc:defs.bzl", "cc_test")
cc_test(
name = "snmalloc_fuzzer",
srcs = ["snmalloc-fuzzer.cpp"],
copts = [
"-fsanitize=address",
] + select({
"@bazel_tools//tools/cpp:clang-cl": ["-fexperimental-library"], "//conditions:default": ["-mcx16"],
}),
defines = [
"SNMALLOC_USE_WAIT_ON_ADDRESS=0",
"ADDRESS_SANITIZER",
],
linkstatic = True,
malloc = "//:snmalloc",
deps = [
"@fuzztest//fuzztest",
"@fuzztest//fuzztest:fuzztest_gtest_main",
],
)