Android.mk revision b69ffdb2078e2272fa5637a8c8f2b58020946e20
1LOCAL_PATH:= $(call my-dir)
2
3app_process_common_shared_libs := \
4    libandroid_runtime \
5    libbinder \
6    libcutils \
7    libdl \
8    libhwbinder \
9    liblog \
10    libnativeloader \
11    libutils \
12
13# This is a list of libraries that need to be included in order to avoid
14# bad apps. This prevents a library from having a mismatch when resolving
15# new/delete from an app shared library.
16# See b/21032018 for more details.
17app_process_common_shared_libs += \
18    libwilhelm \
19
20app_process_common_static_libs := \
21    libsigchain \
22
23app_process_src_files := \
24    app_main.cpp \
25
26app_process_cflags := \
27    -Wall -Werror -Wunused -Wunreachable-code
28
29app_process_ldflags_32 := \
30    -Wl,--version-script,art/sigchainlib/version-script32.txt -Wl,--export-dynamic
31app_process_ldflags_64 := \
32    -Wl,--version-script,art/sigchainlib/version-script64.txt -Wl,--export-dynamic
33
34include $(CLEAR_VARS)
35
36LOCAL_SRC_FILES:= $(app_process_src_files)
37
38LOCAL_LDFLAGS_32 := $(app_process_ldflags_32)
39LOCAL_LDFLAGS_64 := $(app_process_ldflags_64)
40
41LOCAL_SHARED_LIBRARIES := $(app_process_common_shared_libs)
42
43LOCAL_WHOLE_STATIC_LIBRARIES := $(app_process_common_static_libs)
44
45LOCAL_MODULE:= app_process
46LOCAL_MULTILIB := both
47LOCAL_MODULE_STEM_32 := app_process32
48LOCAL_MODULE_STEM_64 := app_process64
49
50LOCAL_CFLAGS += $(app_process_cflags)
51
52# In SANITIZE_LITE mode, we create the sanitized binary in a separate location (but reuse
53# the same module). Using the same module also works around an issue with make: binaries
54# that depend on sanitized libraries will be relinked, even if they set LOCAL_SANITIZE := never.
55#
56# Also pull in the asanwrapper helper.
57ifeq ($(SANITIZE_LITE),true)
58LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan
59LOCAL_REQUIRED_MODULES := asanwrapper
60endif
61
62include $(BUILD_EXECUTABLE)
63
64# Create a symlink from app_process to app_process32 or 64
65# depending on the target configuration.
66ifneq ($(SANITIZE_LITE),true)
67include  $(BUILD_SYSTEM)/executable_prefer_symlink.mk
68endif
69