libinit_host: clean up dependencies
libinit_host doesn't need HIDL stuff. host_init_verifier does HIDL interface checks. Bug: 326827772 Test: mmma system/core Change-Id: I59c1444649a62202abb54a2e0cceee38522c1259
This commit is contained in:
parent
c9d70be7fe
commit
9b4ad17bfb
2 changed files with 60 additions and 12 deletions
|
|
@ -84,11 +84,6 @@ init_device_sources = [
|
|||
"ueventd.cpp",
|
||||
"ueventd_parser.cpp",
|
||||
]
|
||||
init_host_sources = [
|
||||
"check_builtins.cpp",
|
||||
"host_import_parser.cpp",
|
||||
"interface_utils.cpp",
|
||||
]
|
||||
|
||||
soong_config_module_type {
|
||||
name: "libinit_cc_defaults",
|
||||
|
|
@ -606,8 +601,6 @@ cc_defaults {
|
|||
whole_static_libs: ["libcap"],
|
||||
shared_libs: [
|
||||
"libcutils",
|
||||
"libhidl-gen-utils",
|
||||
"libhidlmetadata",
|
||||
"liblog",
|
||||
"libprocessgroup",
|
||||
"libprotobuf-cpp-lite",
|
||||
|
|
@ -615,9 +608,6 @@ cc_defaults {
|
|||
proto: {
|
||||
type: "lite",
|
||||
},
|
||||
generated_headers: [
|
||||
"generated_stub_builtin_function_map",
|
||||
],
|
||||
target: {
|
||||
android: {
|
||||
enabled: false,
|
||||
|
|
@ -636,17 +626,43 @@ cc_defaults {
|
|||
cc_binary {
|
||||
name: "host_init_verifier",
|
||||
defaults: ["init_host_defaults"],
|
||||
srcs: ["host_init_verifier.cpp"] + init_common_sources + init_host_sources,
|
||||
srcs: [
|
||||
"check_builtins.cpp",
|
||||
"host_import_parser.cpp",
|
||||
"host_init_verifier.cpp",
|
||||
"interface_utils.cpp",
|
||||
] + init_common_sources,
|
||||
generated_headers: [
|
||||
"generated_android_ids",
|
||||
"generated_stub_builtin_function_map",
|
||||
],
|
||||
shared_libs: [
|
||||
"libhidl-gen-utils",
|
||||
"libhidlmetadata",
|
||||
],
|
||||
}
|
||||
|
||||
genrule {
|
||||
name: "noop_builtin_function_map",
|
||||
tool_files: ["host_builtin_map.py"],
|
||||
out: ["noop_builtin_function_map.h"],
|
||||
srcs: [
|
||||
"builtins.cpp",
|
||||
"noop_builtins.cpp",
|
||||
],
|
||||
cmd: "$(location host_builtin_map.py) --builtins $(location builtins.cpp) --check_builtins $(location noop_builtins.cpp) > $(out)",
|
||||
}
|
||||
|
||||
cc_library_host_static {
|
||||
name: "libinit_host",
|
||||
defaults: ["init_host_defaults"],
|
||||
srcs: init_common_sources + init_host_sources,
|
||||
srcs: [
|
||||
"noop_builtins.cpp",
|
||||
] + init_common_sources,
|
||||
export_include_dirs: ["."],
|
||||
generated_headers: [
|
||||
"noop_builtin_function_map",
|
||||
],
|
||||
proto: {
|
||||
export_proto_headers: true,
|
||||
},
|
||||
|
|
|
|||
32
init/noop_builtins.cpp
Normal file
32
init/noop_builtins.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (C) 2024 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.
|
||||
*/
|
||||
|
||||
// Note that parser will perform arity checks only.
|
||||
|
||||
#include <android-base/result.h>
|
||||
|
||||
#include "builtin_arguments.h"
|
||||
#include "builtins.h"
|
||||
|
||||
namespace android::init {
|
||||
|
||||
static base::Result<void> check_stub(const BuiltinArguments&) {
|
||||
return {};
|
||||
}
|
||||
|
||||
#include "noop_builtin_function_map.h"
|
||||
|
||||
} // namespace android::init
|
||||
Loading…
Add table
Reference in a new issue