2021-10-05 13:55:22 +00:00
|
|
|
//
|
|
|
|
// Copyright (C) 2022 The Android Open Source Project
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2022-02-10 18:57:23 +00:00
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
}
|
|
|
|
|
2021-10-05 13:55:22 +00:00
|
|
|
cc_library {
|
|
|
|
name: "libnetd_updatable",
|
|
|
|
version_script: "libnetd_updatable.map.txt",
|
|
|
|
stubs: {
|
|
|
|
versions: [
|
|
|
|
"1",
|
|
|
|
],
|
|
|
|
symbol_file: "libnetd_updatable.map.txt",
|
|
|
|
},
|
|
|
|
defaults: ["netd_defaults"],
|
|
|
|
header_libs: [
|
|
|
|
"bpf_connectivity_headers",
|
|
|
|
"libcutils_headers",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"BpfHandler.cpp",
|
|
|
|
"NetdUpdatable.cpp",
|
|
|
|
],
|
2023-06-01 23:09:14 +00:00
|
|
|
static_libs: [
|
|
|
|
"libmodules-utils-build",
|
|
|
|
],
|
2021-10-05 13:55:22 +00:00
|
|
|
shared_libs: [
|
2022-02-01 03:59:32 +00:00
|
|
|
"libbase",
|
2021-10-05 13:55:22 +00:00
|
|
|
"liblog",
|
2022-02-01 03:59:32 +00:00
|
|
|
"libnetdutils",
|
2021-10-05 13:55:22 +00:00
|
|
|
],
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
header_abi_checker: {
|
|
|
|
enabled: true,
|
|
|
|
symbol_file: "libnetd_updatable.map.txt",
|
|
|
|
},
|
|
|
|
sanitize: {
|
|
|
|
cfi: true,
|
|
|
|
},
|
|
|
|
apex_available: ["com.android.tethering"],
|
|
|
|
min_sdk_version: "30",
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_test {
|
|
|
|
name: "netd_updatable_unit_test",
|
|
|
|
defaults: ["netd_defaults"],
|
2022-05-25 07:34:17 +00:00
|
|
|
test_suites: ["general-tests", "mts-tethering"],
|
|
|
|
test_config_template: ":net_native_test_config_template",
|
2021-10-05 13:55:22 +00:00
|
|
|
require_root: true, // required by setrlimitForTest()
|
|
|
|
header_libs: [
|
|
|
|
"bpf_connectivity_headers",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"BpfHandlerTest.cpp",
|
2022-12-19 22:50:18 +00:00
|
|
|
"BpfBaseTest.cpp"
|
2021-10-05 13:55:22 +00:00
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libnetd_updatable",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
"liblog",
|
|
|
|
"libnetdutils",
|
2022-12-19 22:50:18 +00:00
|
|
|
"libprocessgroup",
|
2021-10-05 13:55:22 +00:00
|
|
|
],
|
2022-05-25 07:34:17 +00:00
|
|
|
compile_multilib: "both",
|
2021-10-05 13:55:22 +00:00
|
|
|
multilib: {
|
|
|
|
lib32: {
|
|
|
|
suffix: "32",
|
|
|
|
},
|
|
|
|
lib64: {
|
|
|
|
suffix: "64",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|