blob: a1575173ded62b2ba19d7ded2a33feee649f2a21 [file] [log] [blame]
Bob Badour051ef782021-02-12 17:07:05 -08001package {
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
Colin Cross45c0d712019-03-28 22:31:35 -070018cc_binary {
19 name: "app_process",
20
21 srcs: ["app_main.cpp"],
22
23 multilib: {
24 lib32: {
Roland Levillain7103a892019-06-05 18:26:44 +010025 suffix: "32",
Colin Cross45c0d712019-03-28 22:31:35 -070026 },
27 lib64: {
Roland Levillain7103a892019-06-05 18:26:44 +010028 suffix: "64",
Colin Cross45c0d712019-03-28 22:31:35 -070029 },
30 },
31
Ryan Prichard6b86dfb2021-06-04 13:24:10 -070032 // 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",
Colin Cross45c0d712019-03-28 22:31:35 -070042
43 shared_libs: [
44 "libandroid_runtime",
45 "libbinder",
46 "libcutils",
47 "libdl",
Steven Morelandef6a7da2019-06-17 15:23:41 -070048 "libhidlbase",
Colin Cross45c0d712019-03-28 22:31:35 -070049 "liblog",
50 "libnativeloader",
Nicolas Geoffray26949ec2021-03-05 09:48:48 +000051
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
Colin Cross45c0d712019-03-28 22:31:35 -070058 "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
Colin Cross45c0d712019-03-28 22:31:35 -070067 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,
Mitch Phillips17de8892021-01-13 14:37:08 -080092
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 },
Colin Cross45c0d712019-03-28 22:31:35 -0700101}