blob: a64821a79d455295f5e208277f4169cffd9eb415 [file] [log] [blame]
Songchun Fan59eee562019-10-24 16:46:06 -07001cc_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",
Songchun Fan66fff272020-05-08 14:19:38 -070014 "com.android.sysprop.incremental",
Songchun Fan59eee562019-10-24 16:46:06 -070015 ],
16 shared_libs: [
Alex Buynytskyyebe71e52020-02-10 07:41:22 -080017 "libcrypto",
Songchun Fan59eee562019-10-24 16:46:06 -070018 "liblog",
Songchun Fan0fdee212020-02-12 17:16:03 -080019 "libselinux",
Songchun Fan59eee562019-10-24 16:46:06 -070020 ],
Calin Juravle471a1b72019-11-20 05:26:20 -080021 target: {
22 linux_bionic: {
23 enabled: true,
24 }
Yurii Zubrytskyi7b50c582020-04-22 15:43:56 -070025 },
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 ],
Songchun Fan59eee562019-10-24 16:46:06 -070039}
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",],
Calin Juravle471a1b72019-11-20 05:26:20 -080055 host_supported: true,
56 target: {
57 linux_bionic: {
58 enabled: true,
59 }
60 }
Songchun Fan59eee562019-10-24 16:46:06 -070061}
62
63cc_test {
64 name: "libincfs-test",
Yurii Zubrytskyid6688852019-11-26 17:39:08 -080065 defaults: ["libincfs_defaults"],
Songchun Fan59eee562019-10-24 16:46:06 -070066 static_libs: [
67 "libincfs",
68 ],
69 shared_libs: [
70 "libbase",
71 ],
72 srcs: [
73 "tests/incfs_test.cpp",
Yurii Zubrytskyiddfd5432020-01-31 16:58:29 -080074 "tests/MountRegistry_test.cpp",
Songchun Fan59eee562019-10-24 16:46:06 -070075 ],
76 require_root: true,
77}
Yurii Zubrytskyi921271a2020-04-06 22:37:19 -070078
79cc_binary {
80 name: "incfsdump",
81 defaults: ["libincfs_defaults"],
Yurii Zubrytskyia2b644b2020-04-15 11:05:48 -070082 host_supported: true,
Yurii Zubrytskyi921271a2020-04-06 22:37:19 -070083 static_libs: [
84 "libbase",
85 ],
86 srcs: [
87 "incfsdump/main.cpp",
88 "incfsdump/dump.cpp",
89 ],
90}