1// Copyright (C) 2016 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19filegroup { 20 name: "vts_proto_fuzzer_srcs", 21 srcs: [ 22 "ProtoFuzzerMain.cpp", 23 "ProtoFuzzerMutateFns.cpp", 24 "ProtoFuzzerMutator.cpp", 25 "ProtoFuzzerRunner.cpp", 26 "ProtoFuzzerStaticParams.cpp", 27 "ProtoFuzzerStats.cpp", 28 "ProtoFuzzerUtils.cpp", 29 ], 30} 31 32cc_defaults { 33 name: "vts_proto_fuzzer_default", 34 srcs: [ 35 ":vts_proto_fuzzer_srcs", 36 ], 37 include_dirs: [ 38 "external/llvm/lib/Fuzzer", 39 "test/vts/drivers/hal/common/include", 40 "test/vts-testcase/fuzz/iface_fuzzer/include", 41 ], 42 shared_libs: [ 43 "libbase", 44 "libhidlbase", 45 "libprotobuf-cpp-full", 46 "libutils", 47 "libvts_common", 48 "libvts_multidevice_proto", 49 "libvts_proto_fuzzer_proto", 50 ], 51 static_libs: [ 52 "libhidl-gen-utils", 53 ], 54 cflags: [ 55 "-Wall", 56 "-Werror", 57 "-Wno-unused-parameter", 58 "-Wno-macro-redefined", 59 "-Wno-extra-tokens", 60 "-Wno-c99-extensions", 61 "-fno-omit-frame-pointer", 62 ], 63 fuzz_config: { 64 // This fuzz target must be run against HAL implementation, which are 65 // only present on the device. These are disabled for until Haiku has 66 // improved support for fuzzing HAL services. 67 fuzz_on_haiku_device: false, 68 fuzz_on_haiku_host: false, 69 cc: [ 70 "smoreland@google.com", 71 "trong@google.com", 72 ], 73 }, 74} 75 76cc_fuzz { 77 name: "vts_proto_fuzzer", 78 defaults: ["vts_proto_fuzzer_default"], 79} 80