• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_iproute2_ip_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20    name: "external_iproute2_ip_license",
21    visibility: [":__subpackages__"],
22    license_kinds: [
23        "SPDX-license-identifier-GPL",
24        "SPDX-license-identifier-GPL-2.0",
25        "SPDX-license-identifier-LGPL",
26        "legacy_unencumbered",
27    ],
28    license_text: [
29        "NOTICE",
30    ],
31}
32
33cc_binary {
34    name: "ip",
35    defaults: ["iproute2_defaults"],
36
37    // ordering affects link order, so cannot be quite fully sorted
38    srcs: [
39        "ip6tunnel.c",
40        "ipaddress.c",
41        "ipaddrlabel.c",
42        "ip.c",
43        "ipfou.c",
44        "ipila.c",
45        "ipl2tp.c",
46        "iplink_bridge.c",
47        "iplink_bridge_slave.c",
48        "iplink.c",
49        "iplink_can.c",
50        "iplink_dummy.c",
51        "iplink_geneve.c",
52        "iplink_hsr.c",
53        "iplink_ifb.c",
54        "iplink_ipoib.c",
55        "iplink_ipvlan.c",
56        "iplink_macvlan.c",
57        "iplink_nlmon.c",
58        "iplink_team.c",
59        "iplink_vcan.c",
60        "iplink_vlan.c",
61        "iplink_vrf.c",
62        "iplink_vxcan.c",
63        "iplink_vxlan.c",
64        "iplink_xdp.c",
65        "iplink_xstats.c",
66        "ipmacsec.c",
67        "ipmaddr.c",
68        "ipmonitor.c",
69        "ipmroute.c",
70        "ipneigh.c",
71        "ipnetconf.c",
72        "ipnetns.c",
73        "ipntable.c",
74        "ipprefix.c",
75        "iproute.c",
76        "iproute_lwtunnel.c",
77        "iprule.c",
78        "ipseg6.c",
79        "iptoken.c",
80        "iptunnel.c",
81        "iptuntap.c",
82        "ipvrf.c",
83        "ipxfrm.c",
84        "link_gre6.c",
85        "link_gre.c",
86        "link_ip6tnl.c",
87        "link_iptnl.c",
88        "link_veth.c",
89        "link_vti6.c",
90        "link_vti.c",
91        "rtm_map.c",
92        "static-syms.c",
93        "tcp_metrics.c",
94        "tunnel.c",
95        "xfrm_monitor.c",
96        "xfrm_policy.c",
97        "xfrm_state.c",
98    ],
99
100    shared_libs: [
101        "libiprouteutil",
102        "libnetlink",
103    ],
104
105    cflags: [
106        "-Wno-implicit-function-declaration",
107        "-Wno-int-conversion",
108        "-Wno-missing-field-initializers",
109        "-D_GNU_SOURCE",
110        "-DNETNS_RUN_DIR=\"" + NETNS_RUN_DIR + "\"",
111    ],
112
113    ldflags: [
114        "-Wl,-export-dynamic",
115        "-Wl,--no-gc-sections",
116    ],
117
118    sanitize: {
119        memtag_heap: true,
120    },
121}
122