1package { 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 7license { 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 18cc_binary { 19 name: "app_process", 20 21 srcs: ["app_main.cpp"], 22 23 multilib: { 24 lib32: { 25 suffix: "32", 26 }, 27 lib64: { 28 suffix: "64", 29 }, 30 }, 31 32 // Symbols exported from the executable in .dynsym interpose symbols in every 33 // linker namespace, including an app's classloader namespace. Provide this 34 // version script to prevent unwanted interposition. 35 // 36 // By default, the static linker doesn't export most of an executable's symbols, 37 // but it will export a symbol that appears to override a symbol in a needed DSO. 38 // This commonly happens with C++ vaguely-linked entities, such as template 39 // functions or type_info variables. Hence, a version script is needed even for 40 // an executable. 41 version_script: "version-script.txt", 42 43 shared_libs: [ 44 "libandroid_runtime", 45 "libbinder", 46 "libcutils", 47 "libdl", 48 "libhidlbase", 49 "liblog", 50 "libnativeloader", 51 52 // Even though app_process doesn't call into libsigchain, we need to 53 // make sure it's in the DT list of app_process, as we want all code 54 // in app_process and the libraries it loads to find libsigchain 55 // symbols before libc symbols. 56 "libsigchain", 57 58 "libutils", 59 60 // This is a list of libraries that need to be included in order to avoid 61 // bad apps. This prevents a library from having a mismatch when resolving 62 // new/delete from an app shared library. 63 // See b/21032018 for more details. 64 "libwilhelm", 65 ], 66 67 compile_multilib: "both", 68 69 cflags: [ 70 "-Wall", 71 "-Werror", 72 "-Wunused", 73 "-Wunreachable-code", 74 ], 75 76 // If SANITIZE_LITE is revived this will need: 77 //product_variables: { 78 // sanitize_lite: { 79 // // In SANITIZE_LITE mode, we create the sanitized binary in a separate location (but reuse 80 // // the same module). Using the same module also works around an issue with make: binaries 81 // // that depend on sanitized libraries will be relinked, even if they set LOCAL_SANITIZE := never. 82 // // 83 // // Also pull in the asanwrapper helper. 84 // relative_install_path: "asan", 85 // required: ["asanwrapper"], 86 // }, 87 //}, 88 89 // Create a symlink from app_process to app_process32 or 64 90 // depending on the target configuration. 91 symlink_preferred_arch: true, 92 93 // Enable ASYNC MTE in the zygote, in order to allow apps and the system 94 // server to use MTE. We use ASYNC because we don't expect the pre-fork 95 // zygote to have substantial memory corruption bugs (as it's primarily Java 96 // code), and we don't want to waste memory recording malloc/free stack 97 // traces (which happens in SYNC mode). 98 sanitize: { 99 memtag_heap: true, 100 }, 101} 102