Songchun Fan | 59eee56 | 2019-10-24 16:46:06 -0700 | [diff] [blame] | 1 | cc_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 Fan | 66fff27 | 2020-05-08 14:19:38 -0700 | [diff] [blame] | 14 | "com.android.sysprop.incremental", |
Songchun Fan | 59eee56 | 2019-10-24 16:46:06 -0700 | [diff] [blame] | 15 | ], |
| 16 | shared_libs: [ |
Alex Buynytskyy | ebe71e5 | 2020-02-10 07:41:22 -0800 | [diff] [blame] | 17 | "libcrypto", |
Songchun Fan | 59eee56 | 2019-10-24 16:46:06 -0700 | [diff] [blame] | 18 | "liblog", |
Songchun Fan | 0fdee21 | 2020-02-12 17:16:03 -0800 | [diff] [blame] | 19 | "libselinux", |
Songchun Fan | 59eee56 | 2019-10-24 16:46:06 -0700 | [diff] [blame] | 20 | ], |
Calin Juravle | 471a1b7 | 2019-11-20 05:26:20 -0800 | [diff] [blame] | 21 | target: { |
| 22 | linux_bionic: { |
| 23 | enabled: true, |
| 24 | } |
Yurii Zubrytskyi | 7b50c58 | 2020-04-22 15:43:56 -0700 | [diff] [blame] | 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 | ], |
Songchun Fan | 59eee56 | 2019-10-24 16:46:06 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | cc_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 | |
| 52 | cc_library_headers { |
| 53 | name: "libincfs_headers", |
| 54 | export_include_dirs: ["include/", "kernel-headers",], |
Calin Juravle | 471a1b7 | 2019-11-20 05:26:20 -0800 | [diff] [blame] | 55 | host_supported: true, |
| 56 | target: { |
| 57 | linux_bionic: { |
| 58 | enabled: true, |
| 59 | } |
| 60 | } |
Songchun Fan | 59eee56 | 2019-10-24 16:46:06 -0700 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | cc_test { |
| 64 | name: "libincfs-test", |
Yurii Zubrytskyi | d668885 | 2019-11-26 17:39:08 -0800 | [diff] [blame] | 65 | defaults: ["libincfs_defaults"], |
Songchun Fan | 59eee56 | 2019-10-24 16:46:06 -0700 | [diff] [blame] | 66 | static_libs: [ |
| 67 | "libincfs", |
| 68 | ], |
| 69 | shared_libs: [ |
| 70 | "libbase", |
| 71 | ], |
| 72 | srcs: [ |
| 73 | "tests/incfs_test.cpp", |
Yurii Zubrytskyi | ddfd543 | 2020-01-31 16:58:29 -0800 | [diff] [blame] | 74 | "tests/MountRegistry_test.cpp", |
Songchun Fan | 59eee56 | 2019-10-24 16:46:06 -0700 | [diff] [blame] | 75 | ], |
| 76 | require_root: true, |
| 77 | } |
Yurii Zubrytskyi | 921271a | 2020-04-06 22:37:19 -0700 | [diff] [blame] | 78 | |
| 79 | cc_binary { |
| 80 | name: "incfsdump", |
| 81 | defaults: ["libincfs_defaults"], |
Yurii Zubrytskyi | a2b644b | 2020-04-15 11:05:48 -0700 | [diff] [blame] | 82 | host_supported: true, |
Yurii Zubrytskyi | 921271a | 2020-04-06 22:37:19 -0700 | [diff] [blame] | 83 | static_libs: [ |
| 84 | "libbase", |
| 85 | ], |
| 86 | srcs: [ |
| 87 | "incfsdump/main.cpp", |
| 88 | "incfsdump/dump.cpp", |
| 89 | ], |
| 90 | } |