• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
18 cc_library_headers {
19     name: "libnetd_client_headers",
20     export_include_dirs: ["include"],
21     apex_available: [
22         "//apex_available:platform",
23     ],
24 }
25 
26 cc_library_headers {
27     name: "libnetdbinder_utils_headers",
28     export_include_dirs: ["include/binder_utils"],
29     apex_available: [
30         "//apex_available:platform",
31         "com.android.resolv",
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",
41         "com.android.tethering",
42     ],
43     sdk_version: "29",
44     min_sdk_version: "29",
45 }
46 
47 cc_defaults {
48     name: "netd_defaults",
49     cflags: [
50         "-Wall",
51         "-Werror",
52         // Override -Wno-error=implicit-fallthrough from soong
53         "-Werror=implicit-fallthrough",
54         "-Werror=sometimes-uninitialized",
55         "-Werror=conditional-uninitialized",
56         "-Wnullable-to-nonnull-conversion",
57         "-Wsign-compare",
58         "-Wthread-safety",
59         "-Wunused-parameter",
60         "-Wuninitialized",
61     ],
62     tidy: true,
63     cpp_std: "experimental",
64     tidy_checks: [
65         "android-*",
66         "bugprone-*",
67         "cert-*",
68         "clang-analyzer-security*",
69         "google-*",
70         "misc-*",
71         "performance-*",
72         "-bugprone-macro-parentheses",
73         "-bugprone-narrowing-conversions",  // lots of unsigned -> int conversions
74         "-bugprone-unhandled-self-assignment", // found in DnsResolver/stats.pb.h
75         "-cert-dcl50-cpp",
76         "-cert-err34-c",  // TODO: re-enable after removing atoi() and sscanf() calls
77         "-cert-oop54-cpp", // found in DnsResolver/stats.pb.h
78         "-google-default-arguments",
79         "-google-explicit-constructor",
80         "-google-global-names-in-headers",
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
85         "-performance-noexcept-move-constructor",
86         "-performance-unnecessary-value-param",
87     ],
88     tidy_checks_as_errors: [
89         "android-*",
90         "bugprone-*",
91         "cert-*",
92         "clang-analyzer-security*",
93         "google-*",
94         "misc-*",
95         "performance-*",
96     ],
97 }
98