Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 1 | |
Bob Badour | 6350618 | 2021-02-12 18:19:24 -0800 | [diff] [blame] | 2 | package { |
| 3 | default_applicable_licenses: ["external_libnl_license"], |
| 4 | } |
| 5 | |
| 6 | // Added automatically by a large-scale-change that took the approach of |
| 7 | // 'apply every license found to every target'. While this makes sure we respect |
| 8 | // every license restriction, it may not be entirely correct. |
| 9 | // |
| 10 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 11 | // |
| 12 | // Please consider splitting the single license below into multiple licenses, |
| 13 | // taking care not to lose any license_kind information, and overriding the |
| 14 | // default license using the 'licenses: [...]' property on targets as needed. |
| 15 | // |
| 16 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 17 | // to attach the license to, and including a comment whether the files may be |
| 18 | // used in the current project. |
| 19 | // See: http://go/android-license-faq |
| 20 | license { |
| 21 | name: "external_libnl_license", |
| 22 | visibility: [":__subpackages__"], |
| 23 | license_kinds: [ |
| 24 | "SPDX-license-identifier-BSD", |
| 25 | "SPDX-license-identifier-GPL", |
| 26 | "SPDX-license-identifier-GPL-2.0", |
| 27 | "SPDX-license-identifier-GPL-3.0", |
| 28 | "SPDX-license-identifier-LGPL", |
| 29 | "SPDX-license-identifier-LGPL-2.1", |
| 30 | "SPDX-license-identifier-LGPL-3.0", |
| 31 | "legacy_unencumbered", |
| 32 | ], |
| 33 | license_text: [ |
| 34 | "COPYING", |
| 35 | ], |
| 36 | } |
| 37 | |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 38 | cc_library { |
| 39 | name: "libnl", |
Tomasz Wiszkowski | 7b3e651 | 2017-11-06 12:37:52 -0800 | [diff] [blame] | 40 | host_supported: true, |
Steven Moreland | ed86cb7 | 2017-04-13 14:00:54 -0700 | [diff] [blame] | 41 | vendor_available: true, |
Justin Yun | 75006a2 | 2020-11-11 18:13:31 +0900 | [diff] [blame] | 42 | product_available: true, |
Po-Wen Kao | 5e0a06c | 2024-03-27 18:33:57 +0800 | [diff] [blame] | 43 | recovery_available: true, |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 44 | |
Greg Hartman | c0d2fea | 2017-11-30 18:18:27 -0800 | [diff] [blame] | 45 | target: { |
| 46 | darwin: { |
| 47 | enabled: false, |
| 48 | }, |
Jiyong Park | 78b225a | 2020-09-18 16:22:13 +0900 | [diff] [blame] | 49 | linux_glibc: { |
Haibo Huang | 232e42b | 2020-03-10 18:06:03 -0700 | [diff] [blame] | 50 | local_include_dirs: [ |
| 51 | "include/linux-private", |
| 52 | ], |
| 53 | }, |
Dan Willemsen | d51bf7e | 2021-08-30 13:50:30 -0700 | [diff] [blame] | 54 | host: { |
| 55 | srcs: [ |
Dan Willemsen | d51bf7e | 2021-08-30 13:50:30 -0700 | [diff] [blame] | 56 | "lib/route/link/macvlan.c", |
Dan Willemsen | d51bf7e | 2021-08-30 13:50:30 -0700 | [diff] [blame] | 57 | ], |
| 58 | }, |
Greg Hartman | c0d2fea | 2017-11-30 18:18:27 -0800 | [diff] [blame] | 59 | }, |
| 60 | |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 61 | srcs: [ |
Haibo Huang | 232e42b | 2020-03-10 18:06:03 -0700 | [diff] [blame] | 62 | "lib/*.c", |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 63 | "lib/fib_lookup/lookup.c", |
| 64 | "lib/fib_lookup/request.c", |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 65 | "lib/genl/ctrl.c", |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 66 | "lib/genl/family.c", |
| 67 | "lib/genl/genl.c", |
Haibo Huang | 232e42b | 2020-03-10 18:06:03 -0700 | [diff] [blame] | 68 | "lib/genl/mngt.c", |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 69 | "lib/netfilter/nfnl.c", |
Alexander Koskovich | 6002fe5 | 2023-09-17 11:05:00 -0400 | [diff] [blame] | 70 | "lib/route/addr.c", |
Keith Mok | ac93826 | 2022-10-17 16:36:41 +0000 | [diff] [blame] | 71 | "lib/route/link.c", |
| 72 | "lib/route/link/api.c", |
| 73 | "lib/route/link/macsec.c", |
| 74 | "lib/route/link/sriov.c", |
Daniel Falk | 4b38859 | 2022-10-20 10:05:25 +0200 | [diff] [blame] | 75 | "lib/route/link/vlan.c", |
| 76 | "lib/route/nexthop.c", |
| 77 | "lib/route/nexthop_encap.c", |
| 78 | "lib/route/nh_encap_mpls.c", |
| 79 | "lib/route/route.c", |
| 80 | "lib/route/route_obj.c", |
Haibo Huang | 232e42b | 2020-03-10 18:06:03 -0700 | [diff] [blame] | 81 | "lib/route/route_utils.c", |
| 82 | "lib/route/rtnl.c", |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 83 | ], |
| 84 | |
| 85 | local_include_dirs: [ |
| 86 | "include", |
Christopher Ferris | f07ef77 | 2024-04-04 16:30:02 -0700 | [diff] [blame] | 87 | "lib/route", |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 88 | ], |
| 89 | export_include_dirs: ["include"], |
| 90 | cflags: [ |
| 91 | "-D_BSD_SOURCE", |
Chih-Hung Hsieh | 6822e39 | 2017-09-29 10:17:10 -0700 | [diff] [blame] | 92 | "-Wall", |
| 93 | "-Werror", |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 94 | "-Wno-unused-parameter", |
| 95 | "-Wno-sign-compare", |
| 96 | "-Wno-missing-field-initializers", |
| 97 | "-Wno-tautological-compare", |
| 98 | "-Wno-pointer-arith", |
| 99 | "-UNDEBUG", |
| 100 | "-D_GNU_SOURCE", |
Christopher Ferris | 6925a4a | 2024-06-04 15:21:03 -0700 | [diff] [blame] | 101 | "-D_NL_SYSCONFDIR_LIBNL=\"\\\"/etc/libnl\\\"\"", |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 102 | ], |
Ivan Lozano | d1792ee | 2017-09-26 11:08:08 -0700 | [diff] [blame] | 103 | |
| 104 | sanitize: { |
| 105 | integer_overflow: true, |
Yi Kong | e8016d1 | 2024-05-17 22:11:53 +0900 | [diff] [blame] | 106 | blocklist: "libnl_blocklist.txt", |
Ivan Lozano | d1792ee | 2017-09-26 11:08:08 -0700 | [diff] [blame] | 107 | }, |
Jiyong Park | 6440970 | 2021-01-05 14:44:27 +0900 | [diff] [blame] | 108 | apex_available: [ |
| 109 | "//apex_available:platform", |
| 110 | "com.android.virt", |
| 111 | ], |
Steven Moreland | b7f0bfb | 2017-04-13 13:55:46 -0700 | [diff] [blame] | 112 | } |