1 LOCAL_PATH:= $(call my-dir) 2 3 app_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. 17 app_process_common_shared_libs += \ 18 libwilhelm \ 19 20 app_process_common_static_libs := \ 21 libsigchain \ 22 23 app_process_src_files := \ 24 app_main.cpp \ 25 26 app_process_cflags := \ 27 -Wall -Werror -Wunused -Wunreachable-code 28 29 app_process_ldflags_32 := \ 30 -Wl,--version-script,art/sigchainlib/version-script32.txt -Wl,--export-dynamic 31 app_process_ldflags_64 := \ 32 -Wl,--version-script,art/sigchainlib/version-script64.txt -Wl,--export-dynamic 33 34 include $(CLEAR_VARS) 35 36 LOCAL_SRC_FILES:= $(app_process_src_files) 37 38 LOCAL_LDFLAGS_32 := $(app_process_ldflags_32) 39 LOCAL_LDFLAGS_64 := $(app_process_ldflags_64) 40 41 LOCAL_SHARED_LIBRARIES := $(app_process_common_shared_libs) 42 43 LOCAL_WHOLE_STATIC_LIBRARIES := $(app_process_common_static_libs) 44 45 LOCAL_MODULE:= app_process 46 LOCAL_MULTILIB := both 47 LOCAL_MODULE_STEM_32 := app_process32 48 LOCAL_MODULE_STEM_64 := app_process64 49 50 LOCAL_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. 57 ifeq ($(SANITIZE_LITE),true) 58 LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan 59 LOCAL_REQUIRED_MODULES := asanwrapper 60 endif 61 62 include $(BUILD_EXECUTABLE) 63 64 # Create a symlink from app_process to app_process32 or 64 65 # depending on the target configuration. 66 ifneq ($(SANITIZE_LITE),true) 67 include $(BUILD_SYSTEM)/executable_prefer_symlink.mk 68 endif 69