1cc_defaults { 2 name: "nfc_utils_defaults", 3 include_dirs: [ 4 "system/nfc", 5 ], 6 cflags: [ 7 "-Wall", 8 "-Werror", 9 ], 10 target: { 11 linux_glibc: { 12 cflags: ["-D_GNU_SOURCE"], 13 }, 14 darwin: { 15 enabled: false, 16 }, 17 }, 18 sanitize: { 19 integer_overflow: true, 20 misc_undefined: ["bounds"], 21 }, 22 23} 24 25cc_library_static { 26 name: "libnfcutils", 27 defaults: ["nfc_utils_defaults"], 28 export_include_dirs: ["include"], 29 host_supported: true, 30 srcs: [ 31 "config.cc", 32 "ringbuffer.cc", 33 ], 34 shared_libs: [ 35 "libbase", 36 ], 37 38} 39 40cc_test { 41 name: "nfc_test_utils", 42 defaults: ["nfc_utils_defaults"], 43 test_suites: ["device-tests"], 44 host_supported: true, 45 srcs: [ 46 "test/config_test.cc", 47 "test/ringbuffer_test.cc", 48 ], 49 static_libs: [ 50 "libnfcutils", 51 "libgmock", 52 ], 53 shared_libs: [ 54 "libbase", 55 ], 56} 57 58cc_fuzz { 59 name: "nfc_utils_ringbuffer_fuzzer", 60 host_supported: true, 61 srcs: [ 62 "test/ringbuffer_fuzzer/ringbuffer_fuzzer.cpp", 63 ], 64 static_libs: [ 65 "libnfcutils", 66 ], 67 corpus: [ 68 "test/ringbuffer_fuzzer/corpus/*", 69 ], 70} 71