From 66196495f2ccee01d291f9d36d612e42cf6ba788 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Thu, 6 Feb 2020 11:56:58 -0800 Subject: [PATCH] init: group source files better in Android.bp Test: build Change-Id: I780a82122a08840257c44bff0b93ea6b25f0b2f0 --- init/Android.bp | 128 +++++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 71 deletions(-) diff --git a/init/Android.bp b/init/Android.bp index 42d0b33da..f28934e95 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -14,6 +14,61 @@ // limitations under the License. // +init_common_sources = [ + "action.cpp", + "action_manager.cpp", + "action_parser.cpp", + "capabilities.cpp", + "epoll.cpp", + "import_parser.cpp", + "interface_utils.cpp", + "keychords.cpp", + "parser.cpp", + "property_type.cpp", + "rlimit_parser.cpp", + "service.cpp", + "service_list.cpp", + "service_parser.cpp", + "service_utils.cpp", + "subcontext.cpp", + "subcontext.proto", + "tokenizer.cpp", + "util.cpp", +] +init_device_sources = [ + "bootchart.cpp", + "builtins.cpp", + "devices.cpp", + "firmware_handler.cpp", + "first_stage_init.cpp", + "first_stage_mount.cpp", + "fscrypt_init_extensions.cpp", + "init.cpp", + "lmkd_service.cpp", + "modalias_handler.cpp", + "mount_handler.cpp", + "mount_namespace.cpp", + "persistent_properties.cpp", + "persistent_properties.proto", + "property_service.cpp", + "property_service.proto", + "reboot.cpp", + "reboot_utils.cpp", + "security.cpp", + "selabel.cpp", + "selinux.cpp", + "sigchld_handler.cpp", + "switch_root.cpp", + "uevent_listener.cpp", + "ueventd.cpp", + "ueventd_parser.cpp", +] +init_host_sources = [ + "check_builtins.cpp", + "host_import_parser.cpp", + "host_init_verifier.cpp", +] + cc_defaults { name: "init_defaults", cpp_std: "experimental", @@ -103,53 +158,7 @@ cc_library_static { "init_defaults", "selinux_policy_version", ], - srcs: [ - "action.cpp", - "action_manager.cpp", - "action_parser.cpp", - "bootchart.cpp", - "builtins.cpp", - "capabilities.cpp", - "devices.cpp", - "epoll.cpp", - "firmware_handler.cpp", - "first_stage_init.cpp", - "first_stage_mount.cpp", - "fscrypt_init_extensions.cpp", - "import_parser.cpp", - "init.cpp", - "interface_utils.cpp", - "keychords.cpp", - "lmkd_service.cpp", - "modalias_handler.cpp", - "mount_handler.cpp", - "mount_namespace.cpp", - "parser.cpp", - "persistent_properties.cpp", - "persistent_properties.proto", - "property_service.cpp", - "property_service.proto", - "property_type.cpp", - "reboot.cpp", - "reboot_utils.cpp", - "security.cpp", - "selabel.cpp", - "selinux.cpp", - "service.cpp", - "service_list.cpp", - "service_parser.cpp", - "service_utils.cpp", - "sigchld_handler.cpp", - "subcontext.cpp", - "subcontext.proto", - "switch_root.cpp", - "rlimit_parser.cpp", - "tokenizer.cpp", - "uevent_listener.cpp", - "ueventd.cpp", - "ueventd_parser.cpp", - "util.cpp", - ], + srcs: init_common_sources + init_device_sources, whole_static_libs: [ "libcap", "com.android.sysprop.apex", @@ -297,30 +306,7 @@ cc_binary { "libprocessgroup", "libprotobuf-cpp-lite", ], - srcs: [ - "action.cpp", - "action_manager.cpp", - "action_parser.cpp", - "capabilities.cpp", - "check_builtins.cpp", - "epoll.cpp", - "keychords.cpp", - "import_parser.cpp", - "interface_utils.cpp", - "host_import_parser.cpp", - "host_init_verifier.cpp", - "parser.cpp", - "property_type.cpp", - "rlimit_parser.cpp", - "tokenizer.cpp", - "service.cpp", - "service_list.cpp", - "service_parser.cpp", - "service_utils.cpp", - "subcontext.cpp", - "subcontext.proto", - "util.cpp", - ], + srcs: init_common_sources + init_host_sources, proto: { type: "lite", },