1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "system_nfc_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["system_nfc_license"], 8} 9 10cc_defaults { 11 name: "nfc_utils_defaults", 12 include_dirs: [ 13 "system/nfc", 14 ], 15 cflags: [ 16 "-Wall", 17 "-Werror", 18 ], 19 target: { 20 linux_glibc: { 21 cflags: ["-D_GNU_SOURCE"], 22 }, 23 darwin: { 24 enabled: false, 25 }, 26 }, 27 sanitize: { 28 integer_overflow: true, 29 misc_undefined: ["bounds"], 30 scs: true, 31 }, 32 33} 34 35cc_library_static { 36 name: "libnfcutils", 37 defaults: ["nfc_utils_defaults"], 38 export_include_dirs: ["include"], 39 host_supported: true, 40 srcs: [ 41 "config.cc", 42 "ringbuffer.cc", 43 ], 44 shared_libs: [ 45 "libbase", 46 ], 47 48} 49 50cc_test { 51 name: "nfc_test_utils", 52 defaults: ["nfc_utils_defaults"], 53 test_suites: ["device-tests"], 54 host_supported: true, 55 srcs: [ 56 "test/config_test.cc", 57 "test/ringbuffer_test.cc", 58 ], 59 static_libs: [ 60 "libnfcutils", 61 "libgmock", 62 "libc++fs" 63 ], 64 shared_libs: [ 65 "libbase", 66 ], 67} 68 69cc_fuzz { 70 name: "nfc_utils_ringbuffer_fuzzer", 71 host_supported: true, 72 srcs: [ 73 "test/ringbuffer_fuzzer/ringbuffer_fuzzer.cpp", 74 ], 75 static_libs: [ 76 "libnfcutils", 77 ], 78 corpus: [ 79 "test/ringbuffer_fuzzer/corpus/*", 80 ], 81} 82