blob: 0838a8dd979584ab6650591dd45b870502197af3 [file] [log] [blame]
Bob Badour4114d1a2021-02-12 15:38:42 -08001package {
2 default_applicable_licenses: ["system_netd_license"],
3}
4
5// Added automatically by a large-scale-change
6// See: http://go/android-license-faq
7license {
8 name: "system_netd_license",
9 visibility: [":__subpackages__"],
10 license_kinds: [
11 "SPDX-license-identifier-Apache-2.0",
12 ],
13 license_text: [
14 "NOTICE",
15 ],
16}
17
Robin Lee4fd4d392017-03-14 14:03:05 +000018cc_library_headers {
19 name: "libnetd_client_headers",
20 export_include_dirs: ["include"],
Remi NGUYEN VAN4bcb81c2020-11-27 19:04:14 +090021 apex_available: [
22 "//apex_available:platform",
23 "com.android.tethering",
24 ],
Luke Huang743e0312020-05-26 17:21:28 +080025}
26
27cc_library_headers {
28 name: "libnetdbinder_utils_headers",
29 export_include_dirs: ["include/binder_utils"],
Jiyong Park3144db92020-04-08 23:40:11 +090030 apex_available: [
31 "//apex_available:platform",
32 "com.android.resolv",
33 ],
Jooyung Han3c222552020-04-16 18:48:35 +090034 min_sdk_version: "29",
Robin Lee4fd4d392017-03-14 14:03:05 +000035}
36
Bernie Innocenti0c532742018-06-11 14:12:08 +090037cc_defaults {
38 name: "netd_defaults",
Bernie Innocenti98951792018-06-26 17:13:44 +090039 cflags: [
40 "-Wall",
41 "-Werror",
Bernie Innocenti11cd0202018-10-12 21:27:45 +090042 // Override -Wno-error=implicit-fallthrough from soong
43 "-Werror=implicit-fallthrough",
Bernie Innocentie6305552019-10-30 17:26:00 +090044 "-Werror=sometimes-uninitialized",
45 "-Werror=conditional-uninitialized",
Bernie Innocenti98951792018-06-26 17:13:44 +090046 "-Wnullable-to-nonnull-conversion",
Bernie Innocenti45238a12018-12-04 14:57:48 +090047 "-Wsign-compare",
Bernie Innocenti98951792018-06-26 17:13:44 +090048 "-Wthread-safety",
49 "-Wunused-parameter",
waynema71a0b592018-11-21 13:31:34 +080050 "-Wuninitialized",
Bernie Innocenti98951792018-06-26 17:13:44 +090051 ],
Bernie Innocenti0c532742018-06-11 14:12:08 +090052 tidy: true,
Bernie Innocentidf2640a2019-11-07 16:42:58 +090053 cpp_std: "experimental",
Bernie Innocenti0c532742018-06-11 14:12:08 +090054 tidy_checks: [
55 "android-*",
Maciej Żenczykowski9ef19d42020-04-22 09:57:49 -070056 "bugprone-*",
Bernie Innocenti0c532742018-06-11 14:12:08 +090057 "cert-*",
Bernie Innocenti2a008c52018-10-12 22:30:22 +090058 "clang-analyzer-security*",
Bernie Innocentia5161a02019-01-30 22:40:53 +090059 "google-*",
60 "misc-*",
61 "performance-*",
Chih-Hung Hsieh93d55c02021-02-11 12:09:50 -080062 "-bugprone-macro-parentheses",
Maciej Żenczykowski9ef19d42020-04-22 09:57:49 -070063 "-bugprone-narrowing-conversions", // lots of unsigned -> int conversions
Chih-Hung Hsieh93d55c02021-02-11 12:09:50 -080064 "-bugprone-unhandled-self-assignment", // found in DnsResolver/stats.pb.h
65 "-cert-dcl50-cpp",
Bernie Innocentia5161a02019-01-30 22:40:53 +090066 "-cert-err34-c", // TODO: re-enable after removing atoi() and sscanf() calls
Chih-Hung Hsieh93d55c02021-02-11 12:09:50 -080067 "-cert-oop54-cpp", // found in DnsResolver/stats.pb.h
68 "-google-default-arguments",
69 "-google-explicit-constructor",
70 "-google-global-names-in-headers",
Bernie Innocentia5161a02019-01-30 22:40:53 +090071 "-google-readability-*", // Too pedantic
72 "-google-runtime-int", // Too many unavoidable warnings due to strtol()
73 "-google-runtime-references", // Grandfathered usage of pass by non-const reference
74 "-misc-non-private-member-variables-in-classes", // Also complains about structs
Chih-Hung Hsieh93d55c02021-02-11 12:09:50 -080075 "-performance-noexcept-move-constructor",
76 "-performance-unnecessary-value-param",
Pirama Arumuga Nainar6f528dd2021-03-16 11:33:20 -070077 "-performance-no-int-to-ptr",
Bernie Innocenti2a008c52018-10-12 22:30:22 +090078 ],
79 tidy_flags: [
Maciej Żenczykowski30224292020-04-30 13:03:28 -070080 "-warnings-as-errors="
81 + "android-*,"
82 + "bugprone-*,"
83 + "cert-*,"
84 + "clang-analyzer-security*,"
85 + "google-*,"
86 + "misc-*,"
87 + "performance-*"
Bernie Innocenti0c532742018-06-11 14:12:08 +090088 ],
89}