Bob Badour | 4114d1a | 2021-02-12 15:38:42 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["system_netd_license"], |
| 3 | } |
| 4 | |
| 5 | // Added automatically by a large-scale-change |
| 6 | // See: http://go/android-license-faq |
| 7 | license { |
| 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 Lee | 4fd4d39 | 2017-03-14 14:03:05 +0000 | [diff] [blame] | 18 | cc_library_headers { |
| 19 | name: "libnetd_client_headers", |
| 20 | export_include_dirs: ["include"], |
Remi NGUYEN VAN | 4bcb81c | 2020-11-27 19:04:14 +0900 | [diff] [blame] | 21 | apex_available: [ |
| 22 | "//apex_available:platform", |
Remi NGUYEN VAN | 4bcb81c | 2020-11-27 19:04:14 +0900 | [diff] [blame] | 23 | ], |
Luke Huang | 743e031 | 2020-05-26 17:21:28 +0800 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | cc_library_headers { |
| 27 | name: "libnetdbinder_utils_headers", |
| 28 | export_include_dirs: ["include/binder_utils"], |
Jiyong Park | 3144db9 | 2020-04-08 23:40:11 +0900 | [diff] [blame] | 29 | apex_available: [ |
| 30 | "//apex_available:platform", |
| 31 | "com.android.resolv", |
Maciej Żenczykowski | e3ea09c | 2022-06-15 01:04:03 -0700 | [diff] [blame] | 32 | ], |
| 33 | min_sdk_version: "29", |
| 34 | } |
| 35 | |
| 36 | cc_library_headers { |
| 37 | name: "netd_mainline_headers", |
| 38 | export_include_dirs: ["include/mainline"], |
| 39 | apex_available: [ |
| 40 | "//apex_available:platform", |
Maciej Żenczykowski | cb45540 | 2022-06-13 22:53:58 -0700 | [diff] [blame] | 41 | "com.android.tethering", |
Jiyong Park | 3144db9 | 2020-04-08 23:40:11 +0900 | [diff] [blame] | 42 | ], |
Maciej Żenczykowski | cb45540 | 2022-06-13 22:53:58 -0700 | [diff] [blame] | 43 | sdk_version: "29", |
Jooyung Han | 3c22255 | 2020-04-16 18:48:35 +0900 | [diff] [blame] | 44 | min_sdk_version: "29", |
Robin Lee | 4fd4d39 | 2017-03-14 14:03:05 +0000 | [diff] [blame] | 45 | } |
| 46 | |
Bernie Innocenti | 0c53274 | 2018-06-11 14:12:08 +0900 | [diff] [blame] | 47 | cc_defaults { |
| 48 | name: "netd_defaults", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 49 | cflags: [ |
| 50 | "-Wall", |
| 51 | "-Werror", |
Bernie Innocenti | 11cd020 | 2018-10-12 21:27:45 +0900 | [diff] [blame] | 52 | // Override -Wno-error=implicit-fallthrough from soong |
| 53 | "-Werror=implicit-fallthrough", |
Bernie Innocenti | e630555 | 2019-10-30 17:26:00 +0900 | [diff] [blame] | 54 | "-Werror=sometimes-uninitialized", |
| 55 | "-Werror=conditional-uninitialized", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 56 | "-Wnullable-to-nonnull-conversion", |
Bernie Innocenti | 45238a1 | 2018-12-04 14:57:48 +0900 | [diff] [blame] | 57 | "-Wsign-compare", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 58 | "-Wthread-safety", |
| 59 | "-Wunused-parameter", |
waynema | 71a0b59 | 2018-11-21 13:31:34 +0800 | [diff] [blame] | 60 | "-Wuninitialized", |
Bernie Innocenti | 9895179 | 2018-06-26 17:13:44 +0900 | [diff] [blame] | 61 | ], |
Bernie Innocenti | 0c53274 | 2018-06-11 14:12:08 +0900 | [diff] [blame] | 62 | tidy: true, |
Bernie Innocenti | df2640a | 2019-11-07 16:42:58 +0900 | [diff] [blame] | 63 | cpp_std: "experimental", |
Bernie Innocenti | 0c53274 | 2018-06-11 14:12:08 +0900 | [diff] [blame] | 64 | tidy_checks: [ |
| 65 | "android-*", |
Maciej Żenczykowski | 9ef19d4 | 2020-04-22 09:57:49 -0700 | [diff] [blame] | 66 | "bugprone-*", |
Bernie Innocenti | 0c53274 | 2018-06-11 14:12:08 +0900 | [diff] [blame] | 67 | "cert-*", |
Bernie Innocenti | 2a008c5 | 2018-10-12 22:30:22 +0900 | [diff] [blame] | 68 | "clang-analyzer-security*", |
Bernie Innocenti | a5161a0 | 2019-01-30 22:40:53 +0900 | [diff] [blame] | 69 | "google-*", |
| 70 | "misc-*", |
| 71 | "performance-*", |
Chih-Hung Hsieh | 93d55c0 | 2021-02-11 12:09:50 -0800 | [diff] [blame] | 72 | "-bugprone-macro-parentheses", |
Maciej Żenczykowski | 9ef19d4 | 2020-04-22 09:57:49 -0700 | [diff] [blame] | 73 | "-bugprone-narrowing-conversions", // lots of unsigned -> int conversions |
Chih-Hung Hsieh | 93d55c0 | 2021-02-11 12:09:50 -0800 | [diff] [blame] | 74 | "-bugprone-unhandled-self-assignment", // found in DnsResolver/stats.pb.h |
| 75 | "-cert-dcl50-cpp", |
Bernie Innocenti | a5161a0 | 2019-01-30 22:40:53 +0900 | [diff] [blame] | 76 | "-cert-err34-c", // TODO: re-enable after removing atoi() and sscanf() calls |
Chih-Hung Hsieh | 93d55c0 | 2021-02-11 12:09:50 -0800 | [diff] [blame] | 77 | "-cert-oop54-cpp", // found in DnsResolver/stats.pb.h |
| 78 | "-google-default-arguments", |
| 79 | "-google-explicit-constructor", |
| 80 | "-google-global-names-in-headers", |
Bernie Innocenti | a5161a0 | 2019-01-30 22:40:53 +0900 | [diff] [blame] | 81 | "-google-readability-*", // Too pedantic |
| 82 | "-google-runtime-int", // Too many unavoidable warnings due to strtol() |
| 83 | "-google-runtime-references", // Grandfathered usage of pass by non-const reference |
| 84 | "-misc-non-private-member-variables-in-classes", // Also complains about structs |
Chih-Hung Hsieh | 93d55c0 | 2021-02-11 12:09:50 -0800 | [diff] [blame] | 85 | "-performance-noexcept-move-constructor", |
| 86 | "-performance-unnecessary-value-param", |
Bernie Innocenti | 2a008c5 | 2018-10-12 22:30:22 +0900 | [diff] [blame] | 87 | ], |
| 88 | tidy_flags: [ |
Maciej Żenczykowski | 3022429 | 2020-04-30 13:03:28 -0700 | [diff] [blame] | 89 | "-warnings-as-errors=" |
| 90 | + "android-*," |
| 91 | + "bugprone-*," |
| 92 | + "cert-*," |
| 93 | + "clang-analyzer-security*," |
| 94 | + "google-*," |
| 95 | + "misc-*," |
| 96 | + "performance-*" |
Bernie Innocenti | 0c53274 | 2018-06-11 14:12:08 +0900 | [diff] [blame] | 97 | ], |
| 98 | } |