1cc_defaults { 2 name: "libincfs_defaults", 3 cpp_std: "c++2a", 4 cflags: ["-Werror", "-Wall", "-Wextra"], 5 defaults: ["linux_bionic_supported"], 6 export_include_dirs: ["include/", "kernel-headers",], 7 local_include_dirs: ["include/"], 8 header_libs: [ 9 "libincfs_headers", 10 ], 11 export_header_lib_headers: ["libincfs_headers"], 12 static_libs: [ 13 "libbase", 14 "com.android.sysprop.incremental", 15 ], 16 shared_libs: [ 17 "libcrypto", 18 "liblog", 19 "libselinux", 20 ], 21 target: { 22 linux_bionic: { 23 enabled: true, 24 } 25 }, 26 tidy: true, 27 tidy_checks: [ 28 "android-*", 29 "cert-*", 30 "clang-analyzer-security*", 31 "-cert-err34-c", 32 "clang-analyzer-security*", 33 // Disabling due to many unavoidable warnings from POSIX API usage. 34 "-google-runtime-int", 35 "-google-explicit-constructor", 36 // operator=() does not handle self-assignment properly - all protobuf-generated classes 37 "-cert-oop54-cpp", 38 ], 39} 40 41cc_library { 42 name: "libincfs", 43 defaults: ["libincfs_defaults"], 44 srcs: [ 45 "incfs_ndk.c", 46 "incfs.cpp", 47 "MountRegistry.cpp", 48 "path.cpp", 49 ], 50} 51 52cc_library_headers { 53 name: "libincfs_headers", 54 export_include_dirs: ["include/", "kernel-headers",], 55 host_supported: true, 56 target: { 57 linux_bionic: { 58 enabled: true, 59 } 60 } 61} 62 63cc_test { 64 name: "libincfs-test", 65 defaults: ["libincfs_defaults"], 66 static_libs: [ 67 "libincfs", 68 ], 69 shared_libs: [ 70 "libbase", 71 ], 72 srcs: [ 73 "tests/incfs_test.cpp", 74 "tests/MountRegistry_test.cpp", 75 ], 76 require_root: true, 77} 78 79cc_binary { 80 name: "incfsdump", 81 defaults: ["libincfs_defaults"], 82 host_supported: true, 83 static_libs: [ 84 "libbase", 85 ], 86 srcs: [ 87 "incfsdump/main.cpp", 88 "incfsdump/dump.cpp", 89 ], 90} 91