cc_library_shared {
  name: "libfuzzer-mutator",
  vendor_available: true,
  host_supported: true,

  cflags: [
    "-g",
    "-O0",
    "-funroll-loops",
    "-fPIC",
    "-fpermissive",
    "-std=c++11",
    "-Wno-unused-parameter",
    "-Wno-unused-variable",
  ],

  srcs: [
    "libfuzzer/FuzzerCrossOver.cpp",
    "libfuzzer/FuzzerDataFlowTrace.cpp",
    "libfuzzer/FuzzerDriver.cpp",
    "libfuzzer/FuzzerExtFunctionsDlsym.cpp",
    "libfuzzer/FuzzerExtFunctionsWeak.cpp",
    "libfuzzer/FuzzerExtFunctionsWindows.cpp",
    "libfuzzer/FuzzerExtraCounters.cpp",
    "libfuzzer/FuzzerFork.cpp",
    "libfuzzer/FuzzerIO.cpp",
    "libfuzzer/FuzzerIOPosix.cpp",
    "libfuzzer/FuzzerIOWindows.cpp",
    "libfuzzer/FuzzerLoop.cpp",
    "libfuzzer/FuzzerMerge.cpp",
    "libfuzzer/FuzzerMutate.cpp",
    "libfuzzer/FuzzerSHA1.cpp",
    "libfuzzer/FuzzerTracePC.cpp",
    "libfuzzer/FuzzerUtil.cpp",
    "libfuzzer/FuzzerUtilDarwin.cpp",
    "libfuzzer/FuzzerUtilFuchsia.cpp",
    "libfuzzer/FuzzerUtilLinux.cpp",
    "libfuzzer/FuzzerUtilPosix.cpp",
    "libfuzzer/FuzzerUtilWindows.cpp",
    "libfuzzer/libfuzzer.cpp",
  ],

  header_libs: [
    "libafl_headers",
  ],
}

/*cc_library_shared {
  name: "honggfuzz-mutator",
  vendor_available: true,
  host_supported: true,

  cflags: [
    "-g",
    "-O0",
    "-funroll-loops",
    "-fPIC",
    "-Wl,-Bsymbolic",
  ],

  srcs: [
    "honggfuzz/honggfuzz.c",
    "honggfuzz/mangle.c",
//    "../src/afl-perfomance.c",
  ],

  header_libs: [
    "libafl_headers",
  ],
}*/

cc_library_shared {
  name: "radamsa-mutator",
  vendor_available: true,
  host_supported: true,

  cflags: [
    "-g",
    "-O0",
    "-funroll-loops",
    "-fPIC",
    "-Wno-unused-parameter",
    "-Wno-unused-function",
  ],

  srcs: [
    "radamsa/libradamsa.c",
    "radamsa/radamsa-mutator.c",
  ],

  header_libs: [
    "libafl_headers",
  ],
}

cc_library_shared {
  name: "symcc-mutator",
  vendor_available: true,
  host_supported: true,

  cflags: [
    "-g",
    "-O0",
    "-funroll-loops",
    "-fPIC",
    "-Wno-unused-parameter",
    "-Wno-pointer-sign",
  ],

  srcs: [
    "symcc/symcc.c",
  ],

  header_libs: [
    "libafl_headers",
  ],
}

subdirs = [
  "libprotobuf-mutator-example",
]
