blob: 72fe0516f4808010e2a4ad6bac04a6e839b06aee [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 \
Martijn Coenenb69ffdb2017-04-19 16:40:49 -07008 libhwbinder \
Andreas Gampe622f5112016-11-29 19:28:13 -08009 liblog \
10 libnativeloader \
11 libutils \
12
Christopher Ferrisad817912015-06-17 15:03:20 -070013# 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.
Andreas Gampe622f5112016-11-29 19:28:13 -080017app_process_common_shared_libs += \
Christopher Ferrisad817912015-06-17 15:03:20 -070018 libwilhelm \
19
Andreas Gampe622f5112016-11-29 19:28:13 -080020app_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
Mike Lockwoode0e9e942012-10-24 11:52:57 -070034include $(CLEAR_VARS)
35
Andreas Gampe622f5112016-11-29 19:28:13 -080036LOCAL_SRC_FILES:= $(app_process_src_files)
Dmitriy Ivanov96e0cfa2014-10-07 13:34:42 -070037
Andreas Gampe622f5112016-11-29 19:28:13 -080038LOCAL_LDFLAGS_32 := $(app_process_ldflags_32)
39LOCAL_LDFLAGS_64 := $(app_process_ldflags_64)
Mike Lockwoode0e9e942012-10-24 11:52:57 -070040
Andreas Gampe622f5112016-11-29 19:28:13 -080041LOCAL_SHARED_LIBRARIES := $(app_process_common_shared_libs)
Mike Lockwoode0e9e942012-10-24 11:52:57 -070042
Andreas Gampe622f5112016-11-29 19:28:13 -080043LOCAL_WHOLE_STATIC_LIBRARIES := $(app_process_common_static_libs)
Dmitriy Ivanov5ba317c2014-10-20 14:14:39 -070044
Mike Lockwoode0e9e942012-10-24 11:52:57 -070045LOCAL_MODULE:= app_process
Colin Crossf130f0a2014-03-27 10:20:29 -070046LOCAL_MULTILIB := both
Yongqin Liu559484e2014-05-06 23:30:40 +080047LOCAL_MODULE_STEM_32 := app_process32
Colin Crossf130f0a2014-03-27 10:20:29 -070048LOCAL_MODULE_STEM_64 := app_process64
Andreas Gampecfedceb2014-09-30 21:48:18 -070049
Andreas Gampe622f5112016-11-29 19:28:13 -080050LOCAL_CFLAGS += $(app_process_cflags)
51
Andreas Gampe2200e092016-11-30 16:35:32 -080052# 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.
Andreas Gampe622f5112016-11-29 19:28:13 -080057ifeq ($(SANITIZE_LITE),true)
Andreas Gampe2200e092016-11-30 16:35:32 -080058LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan
59LOCAL_REQUIRED_MODULES := asanwrapper
Andreas Gampe622f5112016-11-29 19:28:13 -080060endif
Andreas Gampecfedceb2014-09-30 21:48:18 -070061
Mike Lockwoode0e9e942012-10-24 11:52:57 -070062include $(BUILD_EXECUTABLE)
63
Yongqin Liu559484e2014-05-06 23:30:40 +080064# Create a symlink from app_process to app_process32 or 64
65# depending on the target configuration.
Andreas Gampe2200e092016-11-30 16:35:32 -080066ifneq ($(SANITIZE_LITE),true)
Yongqin Liu559484e2014-05-06 23:30:40 +080067include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
Andreas Gampe2200e092016-11-30 16:35:32 -080068endif