blob: 8942ff6d5ae53fc508802680268cd2cdf9682d27 [file] [log] [blame]
Robin Lee4fd4d392017-03-14 14:03:05 +00001cc_library_headers {
2 name: "libnetd_client_headers",
3 export_include_dirs: ["include"],
Jiyong Park965a1ed2020-04-08 23:40:11 +09004 apex_available: [
5 "//apex_available:platform",
6 "com.android.resolv",
7 ],
Jooyung Han46969792020-04-16 18:48:35 +09008 min_sdk_version: "29",
Robin Lee4fd4d392017-03-14 14:03:05 +00009}
10
Bernie Innocenti0c532742018-06-11 14:12:08 +090011cc_defaults {
12 name: "netd_defaults",
Bernie Innocenti98951792018-06-26 17:13:44 +090013 cflags: [
14 "-Wall",
15 "-Werror",
Bernie Innocenti11cd0202018-10-12 21:27:45 +090016 // Override -Wno-error=implicit-fallthrough from soong
17 "-Werror=implicit-fallthrough",
Bernie Innocentie6305552019-10-30 17:26:00 +090018 "-Werror=sometimes-uninitialized",
19 "-Werror=conditional-uninitialized",
Bernie Innocenti98951792018-06-26 17:13:44 +090020 "-Wnullable-to-nonnull-conversion",
Bernie Innocenti45238a12018-12-04 14:57:48 +090021 "-Wsign-compare",
Bernie Innocenti98951792018-06-26 17:13:44 +090022 "-Wthread-safety",
23 "-Wunused-parameter",
waynema71a0b592018-11-21 13:31:34 +080024 "-Wuninitialized",
Bernie Innocenti98951792018-06-26 17:13:44 +090025 ],
Bernie Innocenti0c532742018-06-11 14:12:08 +090026 tidy: true,
Bernie Innocentidf2640a2019-11-07 16:42:58 +090027 cpp_std: "experimental",
Bernie Innocenti0c532742018-06-11 14:12:08 +090028 tidy_checks: [
29 "android-*",
Maciej Żenczykowski053eaef2020-04-26 13:33:07 +000030 "bugprone-*",
Bernie Innocenti0c532742018-06-11 14:12:08 +090031 "cert-*",
Bernie Innocenti2a008c52018-10-12 22:30:22 +090032 "clang-analyzer-security*",
Bernie Innocentia5161a02019-01-30 22:40:53 +090033 "google-*",
34 "misc-*",
35 "performance-*",
Maciej Żenczykowski053eaef2020-04-26 13:33:07 +000036 "-bugprone-narrowing-conversions", // lots of unsigned -> int conversions
Bernie Innocentia5161a02019-01-30 22:40:53 +090037 "-cert-err34-c", // TODO: re-enable after removing atoi() and sscanf() calls
38 "-google-readability-*", // Too pedantic
39 "-google-runtime-int", // Too many unavoidable warnings due to strtol()
40 "-google-runtime-references", // Grandfathered usage of pass by non-const reference
41 "-misc-non-private-member-variables-in-classes", // Also complains about structs
Bernie Innocenti2a008c52018-10-12 22:30:22 +090042 ],
43 tidy_flags: [
Maciej Żenczykowski59f18932020-04-30 21:21:53 +000044 "-warnings-as-errors="
45 + "android-*,"
46 + "bugprone-*,"
47 + "cert-*,"
48 + "clang-analyzer-security*,"
49 + "google-*,"
50 + "misc-*,"
51 + "performance-*"
Bernie Innocenti0c532742018-06-11 14:12:08 +090052 ],
53}