blob: 2e6290cc082ffa544708e51fb603280c33affefe [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 ],
Robin Lee4fd4d392017-03-14 14:03:05 +00008}
9
Bernie Innocenti0c532742018-06-11 14:12:08 +090010cc_defaults {
11 name: "netd_defaults",
Bernie Innocenti98951792018-06-26 17:13:44 +090012 cflags: [
13 "-Wall",
14 "-Werror",
Bernie Innocenti11cd0202018-10-12 21:27:45 +090015 // Override -Wno-error=implicit-fallthrough from soong
16 "-Werror=implicit-fallthrough",
Bernie Innocentie6305552019-10-30 17:26:00 +090017 "-Werror=sometimes-uninitialized",
18 "-Werror=conditional-uninitialized",
Bernie Innocenti98951792018-06-26 17:13:44 +090019 "-Wnullable-to-nonnull-conversion",
Bernie Innocenti45238a12018-12-04 14:57:48 +090020 "-Wsign-compare",
Bernie Innocenti98951792018-06-26 17:13:44 +090021 "-Wthread-safety",
22 "-Wunused-parameter",
waynema71a0b592018-11-21 13:31:34 +080023 "-Wuninitialized",
Bernie Innocenti98951792018-06-26 17:13:44 +090024 ],
Bernie Innocenti0c532742018-06-11 14:12:08 +090025 tidy: true,
Bernie Innocentidf2640a2019-11-07 16:42:58 +090026 cpp_std: "experimental",
Bernie Innocenti0c532742018-06-11 14:12:08 +090027 tidy_checks: [
28 "android-*",
Maciej Żenczykowski053eaef2020-04-26 13:33:07 +000029 "bugprone-*",
Bernie Innocenti0c532742018-06-11 14:12:08 +090030 "cert-*",
Bernie Innocenti2a008c52018-10-12 22:30:22 +090031 "clang-analyzer-security*",
Bernie Innocentia5161a02019-01-30 22:40:53 +090032 "google-*",
33 "misc-*",
34 "performance-*",
Maciej Żenczykowski053eaef2020-04-26 13:33:07 +000035 "-bugprone-narrowing-conversions", // lots of unsigned -> int conversions
Bernie Innocentia5161a02019-01-30 22:40:53 +090036 "-cert-err34-c", // TODO: re-enable after removing atoi() and sscanf() calls
37 "-google-readability-*", // Too pedantic
38 "-google-runtime-int", // Too many unavoidable warnings due to strtol()
39 "-google-runtime-references", // Grandfathered usage of pass by non-const reference
40 "-misc-non-private-member-variables-in-classes", // Also complains about structs
Bernie Innocenti2a008c52018-10-12 22:30:22 +090041 ],
42 tidy_flags: [
Maciej Żenczykowskia9eb2e62020-04-28 06:10:23 +000043 "-warnings-as-errors=*"
Bernie Innocenti0c532742018-06-11 14:12:08 +090044 ],
45}