1/* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at: 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18package { 19 // See: http://go/android-license-faq 20 // A large-scale-change added 'default_applicable_licenses' to import 21 // all of the 'license_kinds' from "frameworks_native_license" 22 // to get the below license kinds: 23 // SPDX-license-identifier-Apache-2.0 24 default_applicable_licenses: ["frameworks_native_license"], 25} 26 27cc_defaults { 28 name: "surfaceflinger_fuzz_defaults", 29 include_dirs: [ 30 "frameworks/native/services/surfaceflinger/tests/unittests", 31 ], 32 static_libs: [ 33 "android.hardware.graphics.composer@2.1-resources", 34 "libgmock", 35 "libgui_mocks", 36 "libgmock_ndk", 37 "libgmock_main", 38 "libgtest_ndk_c++", 39 "libgmock_main_ndk", 40 "librenderengine_mocks", 41 "perfetto_trace_protos", 42 "libcompositionengine_mocks", 43 "perfetto_trace_protos", 44 ], 45 shared_libs: [ 46 "libprotoutil", 47 "libstatssocket", 48 "libstatspull", 49 "libtimestats", 50 "libtimestats_proto", 51 "libprotobuf-cpp-full", 52 "android.hardware.graphics.mapper@2.0", 53 "android.hardware.graphics.mapper@3.0", 54 "android.hardware.graphics.mapper@4.0", 55 ], 56 srcs: [ 57 ":libsurfaceflinger_sources", 58 ":libsurfaceflinger_mock_sources", 59 ], 60 defaults: [ 61 "libsurfaceflinger_defaults", 62 ], 63 header_libs: [ 64 "libui_fuzzableDataspaces_headers", 65 "libsurfaceflinger_headers", 66 "libui_headers", 67 ], 68 cflags: [ 69 "-Wno-unused-result", 70 "-Wno-conversion", 71 "-Wno-sign-compare", 72 ], 73 fuzz_config: { 74 cc: [ 75 "android-media-fuzzing-reports@google.com", 76 ], 77 componentid: 155276, 78 }, 79} 80 81cc_fuzz { 82 name: "surfaceflinger_fuzzer", 83 defaults: [ 84 "surfaceflinger_fuzz_defaults", 85 ], 86 srcs: [ 87 "surfaceflinger_fuzzer.cpp", 88 ], 89} 90 91cc_fuzz { 92 name: "surfaceflinger_displayhardware_fuzzer", 93 defaults: [ 94 "surfaceflinger_fuzz_defaults", 95 ], 96 srcs: [ 97 "surfaceflinger_displayhardware_fuzzer.cpp", 98 ], 99 header_libs: [ 100 "android.hardware.graphics.composer@2.4-command-buffer", 101 "android.hardware.graphics.composer@2.4-hal", 102 ], 103} 104 105cc_fuzz { 106 name: "surfaceflinger_scheduler_fuzzer", 107 defaults: [ 108 "surfaceflinger_fuzz_defaults", 109 ], 110 srcs: [ 111 "surfaceflinger_scheduler_fuzzer.cpp", 112 ], 113} 114 115cc_fuzz { 116 name: "surfaceflinger_layer_fuzzer", 117 defaults: [ 118 "surfaceflinger_fuzz_defaults", 119 ], 120 header_libs: [ 121 "libgui_headers", 122 ], 123 static_libs: [ 124 "librenderengine", 125 ], 126 srcs: [ 127 "surfaceflinger_layer_fuzzer.cpp", 128 ], 129} 130