2012-10-24 11:52:57 -07:00
|
|
|
LOCAL_PATH:= $(call my-dir)
|
2014-03-19 17:47:39 -07:00
|
|
|
|
2016-11-29 19:28:13 -08:00
|
|
|
app_process_common_shared_libs := \
|
|
|
|
libandroid_runtime \
|
|
|
|
libbinder \
|
|
|
|
libcutils \
|
|
|
|
libdl \
|
2017-04-19 16:40:49 -07:00
|
|
|
libhwbinder \
|
2016-11-29 19:28:13 -08:00
|
|
|
liblog \
|
|
|
|
libnativeloader \
|
|
|
|
libutils \
|
|
|
|
|
2015-06-17 15:03:20 -07:00
|
|
|
# This is a list of libraries that need to be included in order to avoid
|
|
|
|
# bad apps. This prevents a library from having a mismatch when resolving
|
|
|
|
# new/delete from an app shared library.
|
|
|
|
# See b/21032018 for more details.
|
2016-11-29 19:28:13 -08:00
|
|
|
app_process_common_shared_libs += \
|
2015-06-17 15:03:20 -07:00
|
|
|
libwilhelm \
|
|
|
|
|
2016-11-29 19:28:13 -08:00
|
|
|
app_process_common_static_libs := \
|
|
|
|
libsigchain \
|
|
|
|
|
|
|
|
app_process_src_files := \
|
|
|
|
app_main.cpp \
|
|
|
|
|
|
|
|
app_process_cflags := \
|
|
|
|
-Wall -Werror -Wunused -Wunreachable-code
|
|
|
|
|
|
|
|
app_process_ldflags_32 := \
|
|
|
|
-Wl,--version-script,art/sigchainlib/version-script32.txt -Wl,--export-dynamic
|
|
|
|
app_process_ldflags_64 := \
|
|
|
|
-Wl,--version-script,art/sigchainlib/version-script64.txt -Wl,--export-dynamic
|
|
|
|
|
2012-10-24 11:52:57 -07:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2016-11-29 19:28:13 -08:00
|
|
|
LOCAL_SRC_FILES:= $(app_process_src_files)
|
2014-10-07 13:34:42 -07:00
|
|
|
|
2016-11-29 19:28:13 -08:00
|
|
|
LOCAL_LDFLAGS_32 := $(app_process_ldflags_32)
|
|
|
|
LOCAL_LDFLAGS_64 := $(app_process_ldflags_64)
|
2012-10-24 11:52:57 -07:00
|
|
|
|
2016-11-29 19:28:13 -08:00
|
|
|
LOCAL_SHARED_LIBRARIES := $(app_process_common_shared_libs)
|
2012-10-24 11:52:57 -07:00
|
|
|
|
2016-11-29 19:28:13 -08:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := $(app_process_common_static_libs)
|
2014-10-20 14:14:39 -07:00
|
|
|
|
2012-10-24 11:52:57 -07:00
|
|
|
LOCAL_MODULE:= app_process
|
2014-03-27 10:20:29 -07:00
|
|
|
LOCAL_MULTILIB := both
|
2014-05-06 23:30:40 +08:00
|
|
|
LOCAL_MODULE_STEM_32 := app_process32
|
2014-03-27 10:20:29 -07:00
|
|
|
LOCAL_MODULE_STEM_64 := app_process64
|
2014-09-30 21:48:18 -07:00
|
|
|
|
2016-11-29 19:28:13 -08:00
|
|
|
LOCAL_CFLAGS += $(app_process_cflags)
|
|
|
|
|
2016-11-30 16:35:32 -08:00
|
|
|
# In SANITIZE_LITE mode, we create the sanitized binary in a separate location (but reuse
|
|
|
|
# the same module). Using the same module also works around an issue with make: binaries
|
|
|
|
# that depend on sanitized libraries will be relinked, even if they set LOCAL_SANITIZE := never.
|
|
|
|
#
|
|
|
|
# Also pull in the asanwrapper helper.
|
2016-11-29 19:28:13 -08:00
|
|
|
ifeq ($(SANITIZE_LITE),true)
|
2016-11-30 16:35:32 -08:00
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan
|
|
|
|
LOCAL_REQUIRED_MODULES := asanwrapper
|
2016-11-29 19:28:13 -08:00
|
|
|
endif
|
2014-09-30 21:48:18 -07:00
|
|
|
|
2014-03-19 17:47:39 -07:00
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
|
2014-05-06 23:30:40 +08:00
|
|
|
# Create a symlink from app_process to app_process32 or 64
|
|
|
|
# depending on the target configuration.
|
2016-11-30 16:35:32 -08:00
|
|
|
ifneq ($(SANITIZE_LITE),true)
|
2014-05-06 23:30:40 +08:00
|
|
|
include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
|
2016-11-30 16:35:32 -08:00
|
|
|
endif
|