1// Copyright (C) 2020 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 15// A library to parse kernel versions, including kernel releases and KMI versions. 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_defaults { 21 name: "libkver-defaults", 22 cflags: [ 23 "-Wall", 24 "-Werror", 25 ], 26} 27 28cc_library_static { 29 name: "libkver", 30 host_supported: true, 31 recovery_available: true, 32 defaults: ["libkver-defaults"], 33 export_include_dirs: ["include"], 34 shared_libs: [ 35 "libbase", 36 "liblog", 37 ], 38 srcs: [ 39 "kernel_release.cpp", 40 "kmi_version.cpp", 41 "utils.cpp", 42 ], 43} 44 45cc_test { 46 name: "libkver_test", 47 defaults: ["libkver-defaults"], 48 host_supported: true, 49 static_libs: [ 50 "libkver", 51 ], 52 shared_libs: [ 53 "libbase", 54 "liblog", 55 ], 56 test_suites: [ 57 "general-tests", 58 ], 59 srcs: [ 60 "test.cpp", 61 ], 62} 63 64cc_fuzz { 65 name: "libkver_fuzzer", 66 dictionary: "fuzzer.dict", 67 corpus: ["corpus/*"], 68 host_supported: true, 69 fuzz_config: { 70 cc: ["android-systems-team+bugs@google.com"], 71 componentid: 30545, // Android Systems 72 hotlists: ["2515285"], // gki-updates 73 fuzz_on_haiku_host: true, 74 fuzz_on_haiku_device: false, 75 }, 76 static_libs: [ 77 "libbase", 78 "libkver", 79 "liblog", 80 ], 81 srcs: [ 82 "fuzzer.cpp", 83 ], 84} 85