Merge changes I50417e69,I6892d81c,Id8846844,Ib22da8d4,Iad66f0d4

* changes:
  jni - dynamically link C++ - saves 43 kB
  libservice-connectivity - dynamically link c++ - saves 600 kB
  link libbase & libnetdutils dynamically - save ~17.5 kiB
  remove spurious headers
  libclat only depends on libbase_headers not libbase itself
This commit is contained in:
Patrick Rohr 2022-02-03 19:19:11 +00:00 • committed by Gerrit Code Review
commit 445dede4eb
5 changed files with 6 additions and 17 deletions

View file

@ -99,7 +99,6 @@ cc_library {
],
min_sdk_version: "30",
header_libs: [
"bpf_syscall_wrappers",
"bpf_connectivity_headers",
],
srcs: [

View file

@ -31,12 +31,10 @@ cc_library {
"BpfHandler.cpp",
"NetdUpdatable.cpp",
],
static_libs: [
"libbase",
"libnetdutils",
],
shared_libs: [
"libbase",
"liblog",
"libnetdutils",
],
export_include_dirs: ["include"],
header_abi_checker: {

View file

@ -33,7 +33,6 @@ cc_library_shared {
srcs: [
"jni/com_android_net_module_util/onload.cpp",
],
stl: "libc++_static",
static_libs: [
"libnet_utils_device_common_bpfjni",
],
@ -61,21 +60,20 @@ cc_library_shared {
"jni/com_android_server_TestNetworkService.cpp",
"jni/onload.cpp",
],
stl: "libc++_static",
header_libs: [
"bpf_connectivity_headers",
"libbase_headers",
],
static_libs: [
"libbase",
"libclat",
"libip_checksum",
"libnetdutils",
"libnetjniutils",
"libtraffic_controller",
"netd_aidl_interface-lateststable-ndk",
],
shared_libs: [
"libbase",
"libnetdutils",
"liblog",
"libnativehelper",
],

View file

@ -26,11 +26,8 @@ cc_library {
],
header_libs: [
"bpf_connectivity_headers",
"bpf_headers",
"bpf_syscall_wrappers",
],
static_libs: [
"libnetdutils",
// TrafficController would use the constants of INetd so that add
// netd_aidl_interface-lateststable-ndk.
"netd_aidl_interface-lateststable-ndk",
@ -39,6 +36,7 @@ cc_library {
// TODO: Find a good way to remove libbase.
"libbase",
"libcutils",
"libnetdutils",
"libutils",
"liblog",
],

View file

@ -21,8 +21,7 @@ cc_library_static {
defaults: ["netd_defaults"],
header_libs: [
"bpf_connectivity_headers",
"bpf_headers",
"bpf_syscall_wrappers",
"libbase_headers",
],
srcs: [
"TcUtils.cpp", // TODO: move to frameworks/libs/net
@ -31,7 +30,6 @@ cc_library_static {
],
stl: "libc++_static",
static_libs: [
"libbase",
"libip_checksum",
"libnetdutils", // for netdutils/UidConstants.h in bpf_shared.h
],
@ -47,8 +45,6 @@ cc_test {
test_suites: ["device-tests"],
header_libs: [
"bpf_connectivity_headers",
"bpf_headers",
"bpf_syscall_wrappers",
],
srcs: [
"TcUtilsTest.cpp",