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: { |
Martin Stjernholm | c7c462a | 2020-04-17 00:03:41 +0100 | [diff] [blame] | 25 | // TODO(b/142944043): Remove version script when libsigchain is a DSO. |
| 26 | version_script: "version-script32.txt", |
Roland Levillain | 7103a89 | 2019-06-05 18:26:44 +0100 | [diff] [blame] | 27 | suffix: "32", |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 28 | }, |
| 29 | lib64: { |
Martin Stjernholm | c7c462a | 2020-04-17 00:03:41 +0100 | [diff] [blame] | 30 | // TODO(b/142944043): Remove version script when libsigchain is a DSO. |
| 31 | version_script: "version-script64.txt", |
Roland Levillain | 7103a89 | 2019-06-05 18:26:44 +0100 | [diff] [blame] | 32 | suffix: "64", |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 33 | }, |
| 34 | }, |
| 35 | |
| 36 | ldflags: ["-Wl,--export-dynamic"], |
| 37 | |
| 38 | shared_libs: [ |
| 39 | "libandroid_runtime", |
| 40 | "libbinder", |
| 41 | "libcutils", |
| 42 | "libdl", |
Steven Moreland | ef6a7da | 2019-06-17 15:23:41 -0700 | [diff] [blame] | 43 | "libhidlbase", |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 44 | "liblog", |
| 45 | "libnativeloader", |
| 46 | "libutils", |
| 47 | |
| 48 | // This is a list of libraries that need to be included in order to avoid |
| 49 | // bad apps. This prevents a library from having a mismatch when resolving |
| 50 | // new/delete from an app shared library. |
| 51 | // See b/21032018 for more details. |
| 52 | "libwilhelm", |
| 53 | ], |
| 54 | |
| 55 | whole_static_libs: ["libsigchain"], |
| 56 | |
| 57 | compile_multilib: "both", |
| 58 | |
| 59 | cflags: [ |
| 60 | "-Wall", |
| 61 | "-Werror", |
| 62 | "-Wunused", |
| 63 | "-Wunreachable-code", |
| 64 | ], |
| 65 | |
| 66 | // If SANITIZE_LITE is revived this will need: |
| 67 | //product_variables: { |
| 68 | // sanitize_lite: { |
| 69 | // // In SANITIZE_LITE mode, we create the sanitized binary in a separate location (but reuse |
| 70 | // // the same module). Using the same module also works around an issue with make: binaries |
| 71 | // // that depend on sanitized libraries will be relinked, even if they set LOCAL_SANITIZE := never. |
| 72 | // // |
| 73 | // // Also pull in the asanwrapper helper. |
| 74 | // relative_install_path: "asan", |
| 75 | // required: ["asanwrapper"], |
| 76 | // }, |
| 77 | //}, |
| 78 | |
| 79 | // Create a symlink from app_process to app_process32 or 64 |
| 80 | // depending on the target configuration. |
| 81 | symlink_preferred_arch: true, |
Mitch Phillips | 17de889 | 2021-01-13 14:37:08 -0800 | [diff] [blame] | 82 | |
| 83 | // Enable ASYNC MTE in the zygote, in order to allow apps and the system |
| 84 | // server to use MTE. We use ASYNC because we don't expect the pre-fork |
| 85 | // zygote to have substantial memory corruption bugs (as it's primarily Java |
| 86 | // code), and we don't want to waste memory recording malloc/free stack |
| 87 | // traces (which happens in SYNC mode). |
| 88 | sanitize: { |
| 89 | memtag_heap: true, |
| 90 | }, |
Colin Cross | 45c0d71 | 2019-03-28 22:31:35 -0700 | [diff] [blame] | 91 | } |