Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
Tom Cherry | 6619649 | 2020-02-06 11:56:58 -0800 | [diff] [blame] | 17 | init_common_sources = [ |
| 18 | "action.cpp", |
| 19 | "action_manager.cpp", |
| 20 | "action_parser.cpp", |
| 21 | "capabilities.cpp", |
| 22 | "epoll.cpp", |
| 23 | "import_parser.cpp", |
| 24 | "interface_utils.cpp", |
| 25 | "keychords.cpp", |
| 26 | "parser.cpp", |
| 27 | "property_type.cpp", |
| 28 | "rlimit_parser.cpp", |
| 29 | "service.cpp", |
| 30 | "service_list.cpp", |
| 31 | "service_parser.cpp", |
| 32 | "service_utils.cpp", |
| 33 | "subcontext.cpp", |
| 34 | "subcontext.proto", |
| 35 | "tokenizer.cpp", |
| 36 | "util.cpp", |
| 37 | ] |
| 38 | init_device_sources = [ |
David Anderson | 4117559 | 2020-03-20 19:38:28 -0700 | [diff] [blame] | 39 | "block_dev_initializer.cpp", |
Tom Cherry | 6619649 | 2020-02-06 11:56:58 -0800 | [diff] [blame] | 40 | "bootchart.cpp", |
| 41 | "builtins.cpp", |
| 42 | "devices.cpp", |
| 43 | "firmware_handler.cpp", |
Steve Muckle | a4bf2ce | 2019-11-01 13:58:02 -0700 | [diff] [blame] | 44 | "first_stage_console.cpp", |
Tom Cherry | 6619649 | 2020-02-06 11:56:58 -0800 | [diff] [blame] | 45 | "first_stage_init.cpp", |
| 46 | "first_stage_mount.cpp", |
| 47 | "fscrypt_init_extensions.cpp", |
| 48 | "init.cpp", |
| 49 | "lmkd_service.cpp", |
| 50 | "modalias_handler.cpp", |
| 51 | "mount_handler.cpp", |
| 52 | "mount_namespace.cpp", |
| 53 | "persistent_properties.cpp", |
| 54 | "persistent_properties.proto", |
| 55 | "property_service.cpp", |
| 56 | "property_service.proto", |
| 57 | "reboot.cpp", |
| 58 | "reboot_utils.cpp", |
| 59 | "security.cpp", |
| 60 | "selabel.cpp", |
| 61 | "selinux.cpp", |
| 62 | "sigchld_handler.cpp", |
David Anderson | 491e4da | 2020-12-08 00:21:20 -0800 | [diff] [blame^] | 63 | "snapuserd_transition.cpp", |
Tom Cherry | 6619649 | 2020-02-06 11:56:58 -0800 | [diff] [blame] | 64 | "switch_root.cpp", |
| 65 | "uevent_listener.cpp", |
| 66 | "ueventd.cpp", |
| 67 | "ueventd_parser.cpp", |
| 68 | ] |
| 69 | init_host_sources = [ |
| 70 | "check_builtins.cpp", |
| 71 | "host_import_parser.cpp", |
| 72 | "host_init_verifier.cpp", |
| 73 | ] |
| 74 | |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 75 | cc_defaults { |
| 76 | name: "init_defaults", |
| 77 | cpp_std: "experimental", |
| 78 | sanitize: { |
Tom Cherry | 2ffd65e | 2017-07-26 14:17:09 -0700 | [diff] [blame] | 79 | misc_undefined: ["signed-integer-overflow"], |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 80 | }, |
Chih-Hung Hsieh | 122352d | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 81 | cflags: [ |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 82 | "-DLOG_UEVENTS=0", |
| 83 | "-Wall", |
| 84 | "-Wextra", |
| 85 | "-Wno-unused-parameter", |
| 86 | "-Werror", |
Tom Cherry | 802864c | 2020-03-12 14:29:25 -0700 | [diff] [blame] | 87 | "-Wthread-safety", |
Steve Muckle | d75f30a | 2019-05-21 15:50:39 -0700 | [diff] [blame] | 88 | "-DALLOW_FIRST_STAGE_CONSOLE=0", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 89 | "-DALLOW_LOCAL_PROP_OVERRIDE=0", |
| 90 | "-DALLOW_PERMISSIVE_SELINUX=0", |
| 91 | "-DREBOOT_BOOTLOADER_ON_PANIC=0", |
| 92 | "-DWORLD_WRITABLE_KMSG=0", |
| 93 | "-DDUMP_ON_UMOUNT_FAILURE=0", |
| 94 | "-DSHUTDOWN_ZERO_TIMEOUT=0", |
Tom Cherry | a2f9136 | 2020-02-20 10:50:00 -0800 | [diff] [blame] | 95 | "-DINIT_FULL_SOURCES", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 96 | ], |
| 97 | product_variables: { |
| 98 | debuggable: { |
| 99 | cppflags: [ |
Steve Muckle | d75f30a | 2019-05-21 15:50:39 -0700 | [diff] [blame] | 100 | "-UALLOW_FIRST_STAGE_CONSOLE", |
| 101 | "-DALLOW_FIRST_STAGE_CONSOLE=1", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 102 | "-UALLOW_LOCAL_PROP_OVERRIDE", |
| 103 | "-DALLOW_LOCAL_PROP_OVERRIDE=1", |
| 104 | "-UALLOW_PERMISSIVE_SELINUX", |
| 105 | "-DALLOW_PERMISSIVE_SELINUX=1", |
| 106 | "-UREBOOT_BOOTLOADER_ON_PANIC", |
| 107 | "-DREBOOT_BOOTLOADER_ON_PANIC=1", |
| 108 | "-UWORLD_WRITABLE_KMSG", |
| 109 | "-DWORLD_WRITABLE_KMSG=1", |
| 110 | "-UDUMP_ON_UMOUNT_FAILURE", |
| 111 | "-DDUMP_ON_UMOUNT_FAILURE=1", |
| 112 | ], |
| 113 | }, |
| 114 | eng: { |
| 115 | cppflags: [ |
| 116 | "-USHUTDOWN_ZERO_TIMEOUT", |
| 117 | "-DSHUTDOWN_ZERO_TIMEOUT=1", |
| 118 | ], |
| 119 | }, |
Dmitry Shmidt | c3bc509 | 2017-08-23 14:57:07 -0700 | [diff] [blame] | 120 | uml: { |
| 121 | cppflags: ["-DUSER_MODE_LINUX"], |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 122 | }, |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 123 | }, |
Tom Cherry | 618d310 | 2018-01-19 14:25:48 -0800 | [diff] [blame] | 124 | static_libs: [ |
Tom Cherry | 618d310 | 2018-01-19 14:25:48 -0800 | [diff] [blame] | 125 | "libavb", |
Bowgo Tsai | 30afda7 | 2019-04-11 23:57:24 +0800 | [diff] [blame] | 126 | "libc++fs", |
Yifan Hong | d8ce1fb | 2019-03-22 17:21:58 -0700 | [diff] [blame] | 127 | "libcgrouprc_format", |
Suren Baghdasaryan | c29c2ba | 2019-10-22 17:18:42 -0700 | [diff] [blame] | 128 | "liblmkd_utils", |
Steve Muckle | 18b981e | 2019-04-15 17:43:02 -0700 | [diff] [blame] | 129 | "libmodprobe", |
Tom Cherry | 618d310 | 2018-01-19 14:25:48 -0800 | [diff] [blame] | 130 | "libprotobuf-cpp-lite", |
| 131 | "libpropertyinfoserializer", |
| 132 | "libpropertyinfoparser", |
David Anderson | aca0bea | 2020-09-21 16:34:25 -0700 | [diff] [blame] | 133 | "libsnapshot_cow", |
David Anderson | dfe6d07 | 2019-10-09 16:24:03 -0700 | [diff] [blame] | 134 | "libsnapshot_init", |
Jooyung Han | 1d951b7 | 2020-07-05 03:33:36 +0900 | [diff] [blame] | 135 | "libxml2", |
Jiyong Park | 648ae3a | 2019-12-08 00:25:15 +0900 | [diff] [blame] | 136 | "lib_apex_manifest_proto_lite", |
Yifan Hong | 66f0115 | 2020-04-16 11:05:16 -0700 | [diff] [blame] | 137 | "update_metadata-protos", |
Jiyong Park | 787322c | 2018-06-01 19:26:42 +0900 | [diff] [blame] | 138 | ], |
| 139 | shared_libs: [ |
Tom Cherry | 59656fb | 2019-05-28 10:19:44 -0700 | [diff] [blame] | 140 | "libbacktrace", |
Jiyong Park | 787322c | 2018-06-01 19:26:42 +0900 | [diff] [blame] | 141 | "libbase", |
Tao Bao | 66209ca | 2018-07-25 22:35:45 -0700 | [diff] [blame] | 142 | "libbootloader_message", |
| 143 | "libcutils", |
Jiyong Park | 787322c | 2018-06-01 19:26:42 +0900 | [diff] [blame] | 144 | "libdl", |
Tao Bao | 66209ca | 2018-07-25 22:35:45 -0700 | [diff] [blame] | 145 | "libext4_utils", |
| 146 | "libfs_mgr", |
David Anderson | 0e330f1 | 2019-01-03 18:16:56 -0800 | [diff] [blame] | 147 | "libgsi", |
Tao Bao | 66209ca | 2018-07-25 22:35:45 -0700 | [diff] [blame] | 148 | "libhidl-gen-utils", |
| 149 | "libkeyutils", |
| 150 | "liblog", |
| 151 | "liblogwrap", |
Tom Cherry | 7bfea3d | 2018-11-06 14:12:05 -0800 | [diff] [blame] | 152 | "liblp", |
Suren Baghdasaryan | 82b72a5 | 2018-12-21 11:41:50 -0800 | [diff] [blame] | 153 | "libprocessgroup", |
Yifan Hong | 6f9ce2e | 2019-03-05 15:47:16 -0800 | [diff] [blame] | 154 | "libprocessgroup_setup", |
Jiyong Park | 012171d | 2018-06-19 16:55:05 +0900 | [diff] [blame] | 155 | "libselinux", |
Martijn Coenen | 62e985a | 2018-09-04 06:29:14 +0200 | [diff] [blame] | 156 | "libutils", |
Tom Cherry | 618d310 | 2018-01-19 14:25:48 -0800 | [diff] [blame] | 157 | ], |
Jiyong Park | 93318d4 | 2018-12-26 17:34:39 +0900 | [diff] [blame] | 158 | bootstrap: true, |
Daniel Norman | 8082ba2 | 2019-07-23 10:26:15 -0700 | [diff] [blame] | 159 | visibility: [":__subpackages__"], |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | cc_library_static { |
| 163 | name: "libinit", |
Tom Cherry | 3143848 | 2018-07-20 14:57:00 -0700 | [diff] [blame] | 164 | recovery_available: true, |
Daniel Norman | 8082ba2 | 2019-07-23 10:26:15 -0700 | [diff] [blame] | 165 | defaults: [ |
| 166 | "init_defaults", |
| 167 | "selinux_policy_version", |
| 168 | ], |
Tom Cherry | 6619649 | 2020-02-06 11:56:58 -0800 | [diff] [blame] | 169 | srcs: init_common_sources + init_device_sources, |
Jooyung Han | 1d951b7 | 2020-07-05 03:33:36 +0900 | [diff] [blame] | 170 | generated_sources: [ |
| 171 | "apex-info-list", |
| 172 | ], |
Daniel Norman | 8082ba2 | 2019-07-23 10:26:15 -0700 | [diff] [blame] | 173 | whole_static_libs: [ |
| 174 | "libcap", |
| 175 | "com.android.sysprop.apex", |
Nikita Ioffe | 23dbd6d | 2019-11-14 01:21:24 +0000 | [diff] [blame] | 176 | "com.android.sysprop.init", |
Daniel Norman | 8082ba2 | 2019-07-23 10:26:15 -0700 | [diff] [blame] | 177 | ], |
Jayant Chowdhary | 478c7c1 | 2018-03-28 18:45:35 -0700 | [diff] [blame] | 178 | header_libs: ["bootimg_headers"], |
Tom Cherry | a97faba | 2017-09-15 15:44:04 -0700 | [diff] [blame] | 179 | proto: { |
| 180 | type: "lite", |
| 181 | export_proto_headers: true, |
| 182 | }, |
Martijn Coenen | 62e985a | 2018-09-04 06:29:14 +0200 | [diff] [blame] | 183 | |
| 184 | target: { |
| 185 | recovery: { |
| 186 | cflags: ["-DRECOVERY"], |
Jooyung Han | 1d951b7 | 2020-07-05 03:33:36 +0900 | [diff] [blame] | 187 | exclude_static_libs: [ |
| 188 | "libxml2", |
| 189 | ], |
| 190 | exclude_generated_sources: [ |
| 191 | "apex-info-list", |
| 192 | ], |
Daniel Norman | 8082ba2 | 2019-07-23 10:26:15 -0700 | [diff] [blame] | 193 | exclude_shared_libs: [ |
| 194 | "libbinder", |
| 195 | "libutils", |
| 196 | ], |
Martijn Coenen | 62e985a | 2018-09-04 06:29:14 +0200 | [diff] [blame] | 197 | }, |
| 198 | }, |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 199 | } |
| 200 | |
Steven Moreland | ceb36d0 | 2019-07-15 15:12:56 -0700 | [diff] [blame] | 201 | phony { |
| 202 | name: "init", |
| 203 | required: [ |
| 204 | "init_second_stage", |
| 205 | ], |
| 206 | } |
| 207 | |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 208 | cc_binary { |
Tom Cherry | 3143848 | 2018-07-20 14:57:00 -0700 | [diff] [blame] | 209 | name: "init_second_stage", |
| 210 | recovery_available: true, |
| 211 | stem: "init", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 212 | defaults: ["init_defaults"], |
Tom Cherry | 3143848 | 2018-07-20 14:57:00 -0700 | [diff] [blame] | 213 | static_libs: ["libinit"], |
Jin Qian | 0045697 | 2017-07-06 11:43:45 -0700 | [diff] [blame] | 214 | required: [ |
| 215 | "e2fsdroid", |
Tom Cherry | c9f5353 | 2019-11-04 10:30:36 -0800 | [diff] [blame] | 216 | "init.rc", |
Jin Qian | 0045697 | 2017-07-06 11:43:45 -0700 | [diff] [blame] | 217 | "mke2fs", |
Jaegeuk Kim | 899ad55 | 2017-11-28 19:26:34 -0800 | [diff] [blame] | 218 | "sload_f2fs", |
| 219 | "make_f2fs", |
Tom Cherry | c9f5353 | 2019-11-04 10:30:36 -0800 | [diff] [blame] | 220 | "ueventd.rc", |
Jin Qian | 0045697 | 2017-07-06 11:43:45 -0700 | [diff] [blame] | 221 | ], |
Tom Cherry | 618d310 | 2018-01-19 14:25:48 -0800 | [diff] [blame] | 222 | srcs: ["main.cpp"], |
Tom Cherry | 3143848 | 2018-07-20 14:57:00 -0700 | [diff] [blame] | 223 | symlinks: ["ueventd"], |
Martijn Coenen | 62e985a | 2018-09-04 06:29:14 +0200 | [diff] [blame] | 224 | target: { |
| 225 | recovery: { |
| 226 | cflags: ["-DRECOVERY"], |
Jooyung Han | 1d951b7 | 2020-07-05 03:33:36 +0900 | [diff] [blame] | 227 | exclude_static_libs: [ |
| 228 | "libxml2", |
| 229 | ], |
Daniel Norman | 8082ba2 | 2019-07-23 10:26:15 -0700 | [diff] [blame] | 230 | exclude_shared_libs: [ |
| 231 | "libbinder", |
| 232 | "libutils", |
| 233 | ], |
Martijn Coenen | 62e985a | 2018-09-04 06:29:14 +0200 | [diff] [blame] | 234 | }, |
| 235 | }, |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 236 | } |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 237 | |
| 238 | // Tests |
| 239 | // ------------------------------------------------------------------------------ |
| 240 | |
| 241 | cc_test { |
Tom Cherry | 17b2be0 | 2019-08-20 10:43:48 -0700 | [diff] [blame] | 242 | name: "CtsInitTestCases", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 243 | defaults: ["init_defaults"], |
Josh Gao | 6cad139 | 2019-08-27 16:02:38 -0700 | [diff] [blame] | 244 | require_root: true, |
| 245 | |
Tom Cherry | 17b2be0 | 2019-08-20 10:43:48 -0700 | [diff] [blame] | 246 | compile_multilib: "both", |
| 247 | multilib: { |
| 248 | lib32: { |
| 249 | suffix: "32", |
| 250 | }, |
| 251 | lib64: { |
| 252 | suffix: "64", |
| 253 | }, |
| 254 | }, |
| 255 | |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 256 | srcs: [ |
| 257 | "devices_test.cpp", |
Tom Cherry | dcb3d15 | 2019-08-07 16:02:28 -0700 | [diff] [blame] | 258 | "firmware_handler_test.cpp", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 259 | "init_test.cpp", |
Mark Salyzyn | 75b901d | 2018-05-15 11:19:43 -0700 | [diff] [blame] | 260 | "keychords_test.cpp", |
Tom Cherry | bdbf504 | 2020-03-04 10:52:08 -0800 | [diff] [blame] | 261 | "oneshot_on_test.cpp", |
Tom Cherry | 16fad42 | 2017-08-04 15:59:03 -0700 | [diff] [blame] | 262 | "persistent_properties_test.cpp", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 263 | "property_service_test.cpp", |
Tom Cherry | 927c5d5 | 2017-12-11 01:40:07 -0800 | [diff] [blame] | 264 | "property_type_test.cpp", |
Tom Cherry | 7ac013d | 2017-08-25 10:39:25 -0700 | [diff] [blame] | 265 | "rlimit_parser_test.cpp", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 266 | "service_test.cpp", |
Tom Cherry | cb0f9bb | 2017-09-12 15:58:47 -0700 | [diff] [blame] | 267 | "subcontext_test.cpp", |
Tom Cherry | 2a5a4e7 | 2018-06-26 13:56:34 -0700 | [diff] [blame] | 268 | "tokenizer_test.cpp", |
Tom Cherry | 5f0198b | 2018-07-17 15:28:16 -0700 | [diff] [blame] | 269 | "ueventd_parser_test.cpp", |
Tom Cherry | c2e181c | 2017-07-14 16:29:23 -0700 | [diff] [blame] | 270 | "ueventd_test.cpp", |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 271 | "util_test.cpp", |
| 272 | ], |
Tom Cherry | 618d310 | 2018-01-19 14:25:48 -0800 | [diff] [blame] | 273 | static_libs: ["libinit"], |
Tom Cherry | 17b2be0 | 2019-08-20 10:43:48 -0700 | [diff] [blame] | 274 | |
| 275 | test_suites: [ |
| 276 | "cts", |
| 277 | "device-tests", |
Tom Cherry | 17b2be0 | 2019-08-20 10:43:48 -0700 | [diff] [blame] | 278 | ], |
Tom Cherry | 14fc013 | 2017-05-09 17:11:57 -0700 | [diff] [blame] | 279 | } |
| 280 | |
Tom Cherry | cb0f9bb | 2017-09-12 15:58:47 -0700 | [diff] [blame] | 281 | cc_benchmark { |
| 282 | name: "init_benchmarks", |
| 283 | defaults: ["init_defaults"], |
| 284 | srcs: [ |
| 285 | "subcontext_benchmark.cpp", |
| 286 | ], |
Tom Cherry | 618d310 | 2018-01-19 14:25:48 -0800 | [diff] [blame] | 287 | static_libs: ["libinit"], |
Tom Cherry | cb0f9bb | 2017-09-12 15:58:47 -0700 | [diff] [blame] | 288 | } |
| 289 | |
Tom Cherry | a2f9136 | 2020-02-20 10:50:00 -0800 | [diff] [blame] | 290 | cc_defaults { |
| 291 | name: "libinit_test_utils_libraries_defaults", |
| 292 | shared_libs: [ |
| 293 | "libbase", |
| 294 | "libcutils", |
| 295 | "libselinux", |
| 296 | "libhidl-gen-utils", |
| 297 | "liblog", |
| 298 | "libprocessgroup", |
| 299 | "libprotobuf-cpp-lite", |
| 300 | ], |
| 301 | } |
| 302 | |
| 303 | cc_library_static { |
| 304 | name: "libinit_test_utils", |
| 305 | defaults: ["libinit_test_utils_libraries_defaults"], |
| 306 | cflags: [ |
| 307 | "-Wall", |
| 308 | "-Wextra", |
| 309 | "-Wno-unused-parameter", |
| 310 | "-Werror", |
| 311 | ], |
| 312 | srcs: init_common_sources + [ |
| 313 | "test_utils/service_utils.cpp", |
| 314 | ], |
| 315 | whole_static_libs: [ |
| 316 | "libcap", |
| 317 | ], |
| 318 | export_include_dirs: ["test_utils/include"], // for tests |
| 319 | } |
| 320 | |
Tom Cherry | de6bd50 | 2018-02-13 16:50:08 -0800 | [diff] [blame] | 321 | // Host Verifier |
| 322 | // ------------------------------------------------------------------------------ |
| 323 | |
| 324 | genrule { |
| 325 | name: "generated_stub_builtin_function_map", |
Tom Cherry | 4772f1d | 2019-07-30 09:34:41 -0700 | [diff] [blame] | 326 | tool_files: ["host_builtin_map.py"], |
Tom Cherry | de6bd50 | 2018-02-13 16:50:08 -0800 | [diff] [blame] | 327 | out: ["generated_stub_builtin_function_map.h"], |
Daniel Norman | d2533c3 | 2019-08-02 15:13:50 -0700 | [diff] [blame] | 328 | srcs: [ |
| 329 | "builtins.cpp", |
| 330 | "check_builtins.cpp", |
| 331 | ], |
Tom Cherry | 4772f1d | 2019-07-30 09:34:41 -0700 | [diff] [blame] | 332 | cmd: "$(location host_builtin_map.py) --builtins $(location builtins.cpp) --check_builtins $(location check_builtins.cpp) > $(out)", |
Tom Cherry | de6bd50 | 2018-02-13 16:50:08 -0800 | [diff] [blame] | 333 | } |
| 334 | |
| 335 | cc_binary { |
| 336 | name: "host_init_verifier", |
| 337 | host_supported: true, |
| 338 | cpp_std: "experimental", |
| 339 | cflags: [ |
| 340 | "-Wall", |
| 341 | "-Wextra", |
| 342 | "-Wno-unused-parameter", |
| 343 | "-Werror", |
| 344 | ], |
| 345 | static_libs: [ |
| 346 | "libbase", |
| 347 | "libselinux", |
Tom Cherry | b5f2ec0 | 2019-11-08 17:54:27 -0800 | [diff] [blame] | 348 | "libpropertyinfoserializer", |
| 349 | "libpropertyinfoparser", |
Tom Cherry | de6bd50 | 2018-02-13 16:50:08 -0800 | [diff] [blame] | 350 | ], |
| 351 | whole_static_libs: ["libcap"], |
| 352 | shared_libs: [ |
Tom Cherry | de6bd50 | 2018-02-13 16:50:08 -0800 | [diff] [blame] | 353 | "libcutils", |
Daniel Norman | 3f42a76 | 2019-07-09 11:00:53 -0700 | [diff] [blame] | 354 | "libhidl-gen-utils", |
Steven Moreland | 422a758 | 2019-10-15 14:53:19 -0700 | [diff] [blame] | 355 | "libhidlmetadata", |
Daniel Norman | 3f42a76 | 2019-07-09 11:00:53 -0700 | [diff] [blame] | 356 | "liblog", |
| 357 | "libprocessgroup", |
| 358 | "libprotobuf-cpp-lite", |
Tom Cherry | de6bd50 | 2018-02-13 16:50:08 -0800 | [diff] [blame] | 359 | ], |
Tom Cherry | 6619649 | 2020-02-06 11:56:58 -0800 | [diff] [blame] | 360 | srcs: init_common_sources + init_host_sources, |
Tom Cherry | de6bd50 | 2018-02-13 16:50:08 -0800 | [diff] [blame] | 361 | proto: { |
| 362 | type: "lite", |
| 363 | }, |
Yifan Hong | 3c4aa11 | 2018-06-20 22:49:48 +0000 | [diff] [blame] | 364 | generated_headers: [ |
| 365 | "generated_stub_builtin_function_map", |
Daniel Norman | 8082ba2 | 2019-07-23 10:26:15 -0700 | [diff] [blame] | 366 | "generated_android_ids", |
Yifan Hong | 3c4aa11 | 2018-06-20 22:49:48 +0000 | [diff] [blame] | 367 | ], |
Tom Cherry | 96ff0fe | 2018-02-28 17:20:27 -0800 | [diff] [blame] | 368 | target: { |
Tom Cherry | 547f731 | 2018-02-28 21:40:46 -0800 | [diff] [blame] | 369 | android: { |
| 370 | enabled: false, |
| 371 | }, |
Tom Cherry | 96ff0fe | 2018-02-28 17:20:27 -0800 | [diff] [blame] | 372 | darwin: { |
Yifan Hong | 3c4aa11 | 2018-06-20 22:49:48 +0000 | [diff] [blame] | 373 | enabled: false, |
Tom Cherry | 96ff0fe | 2018-02-28 17:20:27 -0800 | [diff] [blame] | 374 | }, |
| 375 | }, |
Tom Cherry | de6bd50 | 2018-02-13 16:50:08 -0800 | [diff] [blame] | 376 | } |