Bob Badour | 051ef78 | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["frameworks_base_cmds_app_process_license"], |
| 3 | } |
| 4 | |
| 5 | // Added automatically by a large-scale-change |
| 6 | // See: http://go/android-license-faq |
| 7 | license { |
| 8 | name: "frameworks_base_cmds_app_process_license", |
| 9 | visibility: [":__subpackages__"], |
| 10 | license_kinds: [ |
| 11 | "SPDX-license-identifier-Apache-2.0", |
| 12 | ], |
| 13 | license_text: [ |
| 14 | "NOTICE", |
| 15 | ], |
| 16 | } |
| 17 | |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 18 | cc_binary { |
| 19 | name: "app_process", |
| 20 | |
| 21 | srcs: ["app_main.cpp"], |
| 22 | |
| 23 | multilib: { |
| 24 | lib32: { |
Roland Levillain | 7103a89 | 2019-06-05 18:26:44 +0100 | [diff] [blame] | 25 | suffix: "32", |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 26 | }, |
| 27 | lib64: { |
Roland Levillain | 7103a89 | 2019-06-05 18:26:44 +0100 | [diff] [blame] | 28 | suffix: "64", |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 29 | }, |
| 30 | }, |
| 31 | |
| 32 | ldflags: ["-Wl,--export-dynamic"], |
| 33 | |
| 34 | shared_libs: [ |
| 35 | "libandroid_runtime", |
| 36 | "libbinder", |
| 37 | "libcutils", |
| 38 | "libdl", |
Steven Moreland | ef6a7da | 2019-06-17 15:23:41 -0700 | [diff] [blame] | 39 | "libhidlbase", |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 40 | "liblog", |
| 41 | "libnativeloader", |
Nicolas Geoffray | 26949ec | 2021-03-05 09:48:48 +0000 | [diff] [blame^] | 42 | |
| 43 | // Even though app_process doesn't call into libsigchain, we need to |
| 44 | // make sure it's in the DT list of app_process, as we want all code |
| 45 | // in app_process and the libraries it loads to find libsigchain |
| 46 | // symbols before libc symbols. |
| 47 | "libsigchain", |
| 48 | |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 49 | "libutils", |
| 50 | |
| 51 | // This is a list of libraries that need to be included in order to avoid |
| 52 | // bad apps. This prevents a library from having a mismatch when resolving |
| 53 | // new/delete from an app shared library. |
| 54 | // See b/21032018 for more details. |
| 55 | "libwilhelm", |
| 56 | ], |
| 57 | |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 58 | compile_multilib: "both", |
| 59 | |
| 60 | cflags: [ |
| 61 | "-Wall", |
| 62 | "-Werror", |
| 63 | "-Wunused", |
| 64 | "-Wunreachable-code", |
| 65 | ], |
| 66 | |
| 67 | // If SANITIZE_LITE is revived this will need: |
| 68 | //product_variables: { |
| 69 | // sanitize_lite: { |
| 70 | // // In SANITIZE_LITE mode, we create the sanitized binary in a separate location (but reuse |
| 71 | // // the same module). Using the same module also works around an issue with make: binaries |
| 72 | // // that depend on sanitized libraries will be relinked, even if they set LOCAL_SANITIZE := never. |
| 73 | // // |
| 74 | // // Also pull in the asanwrapper helper. |
| 75 | // relative_install_path: "asan", |
| 76 | // required: ["asanwrapper"], |
| 77 | // }, |
| 78 | //}, |
| 79 | |
| 80 | // Create a symlink from app_process to app_process32 or 64 |
| 81 | // depending on the target configuration. |
| 82 | symlink_preferred_arch: true, |
Mitch Phillips | 17de889 | 2021-01-13 14:37:08 -0800 | [diff] [blame] | 83 | |
| 84 | // Enable ASYNC MTE in the zygote, in order to allow apps and the system |
| 85 | // server to use MTE. We use ASYNC because we don't expect the pre-fork |
| 86 | // zygote to have substantial memory corruption bugs (as it's primarily Java |
| 87 | // code), and we don't want to waste memory recording malloc/free stack |
| 88 | // traces (which happens in SYNC mode). |
| 89 | sanitize: { |
| 90 | memtag_heap: true, |
| 91 | }, |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 92 | } |