1LOCAL_PATH:= $(call my-dir)
2
3# This is a list of libraries that need to be included in order to avoid
4# bad apps. This prevents a library from having a mismatch when resolving
5# new/delete from an app shared library.
6# See b/21032018 for more details.
7app_process_common_shared_libs := \
8    libwilhelm \
9
10include $(CLEAR_VARS)
11
12LOCAL_SRC_FILES:= \
13    app_main.cpp
14
15LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
16
17LOCAL_SHARED_LIBRARIES := \
18    libdl \
19    libcutils \
20    libutils \
21    liblog \
22    libbinder \
23    libnativeloader \
24    libandroid_runtime \
25    $(app_process_common_shared_libs) \
26
27LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
28
29LOCAL_MODULE:= app_process
30LOCAL_MULTILIB := both
31LOCAL_MODULE_STEM_32 := app_process32
32LOCAL_MODULE_STEM_64 := app_process64
33
34LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
35
36include $(BUILD_EXECUTABLE)
37
38# Create a symlink from app_process to app_process32 or 64
39# depending on the target configuration.
40include  $(BUILD_SYSTEM)/executable_prefer_symlink.mk
41
42# Build a variant of app_process binary linked with ASan runtime.
43# ARM-only at the moment.
44ifeq ($(TARGET_ARCH),arm)
45
46include $(CLEAR_VARS)
47
48LOCAL_SRC_FILES:= \
49    app_main.cpp
50
51LOCAL_SHARED_LIBRARIES := \
52    libcutils \
53    libutils \
54    liblog \
55    libbinder \
56    libandroid_runtime \
57    $(app_process_common_shared_libs) \
58
59LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
60
61LOCAL_LDFLAGS := -ldl -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
62LOCAL_CPPFLAGS := -std=c++11
63
64LOCAL_MODULE := app_process__asan
65LOCAL_MULTILIB := both
66LOCAL_MODULE_STEM_32 := app_process32
67LOCAL_MODULE_STEM_64 := app_process64
68
69LOCAL_SANITIZE := address
70LOCAL_CLANG := true
71LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan
72
73LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
74
75include $(BUILD_EXECUTABLE)
76
77endif # ifeq($(TARGET_ARCH),arm)
78