blob: eaad3a7ec5297f3d1bd93d74de3d598a402844be [file] [log] [blame]
Mike Lockwoode0e9e942012-10-24 11:52:57 -07001LOCAL_PATH:= $(call my-dir)
Colin Cross2764fce2014-03-19 17:47:39 -07002
Andreas Gampe622f5112016-11-29 19:28:13 -08003app_process_common_shared_libs := \
4 libandroid_runtime \
5 libbinder \
6 libcutils \
7 libdl \
8 liblog \
9 libnativeloader \
10 libutils \
11
Christopher Ferrisad817912015-06-17 15:03:20 -070012# This is a list of libraries that need to be included in order to avoid
13# bad apps. This prevents a library from having a mismatch when resolving
14# new/delete from an app shared library.
15# See b/21032018 for more details.
Andreas Gampe622f5112016-11-29 19:28:13 -080016app_process_common_shared_libs += \
Christopher Ferrisad817912015-06-17 15:03:20 -070017 libwilhelm \
18
Andreas Gampe622f5112016-11-29 19:28:13 -080019app_process_common_static_libs := \
20 libsigchain \
21
22app_process_src_files := \
23 app_main.cpp \
24
25app_process_cflags := \
26 -Wall -Werror -Wunused -Wunreachable-code
27
28app_process_ldflags_32 := \
29 -Wl,--version-script,art/sigchainlib/version-script32.txt -Wl,--export-dynamic
30app_process_ldflags_64 := \
31 -Wl,--version-script,art/sigchainlib/version-script64.txt -Wl,--export-dynamic
32
Mike Lockwoode0e9e942012-10-24 11:52:57 -070033include $(CLEAR_VARS)
34
Andreas Gampe622f5112016-11-29 19:28:13 -080035LOCAL_SRC_FILES:= $(app_process_src_files)
Dmitriy Ivanov96e0cfa2014-10-07 13:34:42 -070036
Andreas Gampe622f5112016-11-29 19:28:13 -080037LOCAL_LDFLAGS_32 := $(app_process_ldflags_32)
38LOCAL_LDFLAGS_64 := $(app_process_ldflags_64)
Mike Lockwoode0e9e942012-10-24 11:52:57 -070039
Andreas Gampe622f5112016-11-29 19:28:13 -080040LOCAL_SHARED_LIBRARIES := $(app_process_common_shared_libs)
Mike Lockwoode0e9e942012-10-24 11:52:57 -070041
Andreas Gampe622f5112016-11-29 19:28:13 -080042LOCAL_WHOLE_STATIC_LIBRARIES := $(app_process_common_static_libs)
Dmitriy Ivanov5ba317c2014-10-20 14:14:39 -070043
Mike Lockwoode0e9e942012-10-24 11:52:57 -070044LOCAL_MODULE:= app_process
Colin Crossf130f0a2014-03-27 10:20:29 -070045LOCAL_MULTILIB := both
Yongqin Liu559484e2014-05-06 23:30:40 +080046LOCAL_MODULE_STEM_32 := app_process32
Colin Crossf130f0a2014-03-27 10:20:29 -070047LOCAL_MODULE_STEM_64 := app_process64
Andreas Gampecfedceb2014-09-30 21:48:18 -070048
Andreas Gampe622f5112016-11-29 19:28:13 -080049LOCAL_CFLAGS += $(app_process_cflags)
50
Andreas Gampe2200e092016-11-30 16:35:32 -080051# In SANITIZE_LITE mode, we create the sanitized binary in a separate location (but reuse
52# the same module). Using the same module also works around an issue with make: binaries
53# that depend on sanitized libraries will be relinked, even if they set LOCAL_SANITIZE := never.
54#
55# Also pull in the asanwrapper helper.
Andreas Gampe622f5112016-11-29 19:28:13 -080056ifeq ($(SANITIZE_LITE),true)
Andreas Gampe2200e092016-11-30 16:35:32 -080057LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan
58LOCAL_REQUIRED_MODULES := asanwrapper
Andreas Gampe622f5112016-11-29 19:28:13 -080059endif
Andreas Gampecfedceb2014-09-30 21:48:18 -070060
Mike Lockwoode0e9e942012-10-24 11:52:57 -070061include $(BUILD_EXECUTABLE)
62
Yongqin Liu559484e2014-05-06 23:30:40 +080063# Create a symlink from app_process to app_process32 or 64
64# depending on the target configuration.
Andreas Gampe2200e092016-11-30 16:35:32 -080065ifneq ($(SANITIZE_LITE),true)
Yongqin Liu559484e2014-05-06 23:30:40 +080066include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
Andreas Gampe2200e092016-11-30 16:35:32 -080067endif