blob: 3ae9e120463293edbf659944ea7f99fce66fad66 [file] [log] [blame]
Mike Lockwoode0e9e942012-10-24 11:52:57 -07001LOCAL_PATH:= $(call my-dir)
Colin Cross2764fce2014-03-19 17:47:39 -07002
Christopher Ferrisad817912015-06-17 15:03:20 -07003# 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
Mike Lockwoode0e9e942012-10-24 11:52:57 -070010include $(CLEAR_VARS)
11
12LOCAL_SRC_FILES:= \
Andreas Gampecfedceb2014-09-30 21:48:18 -070013 app_main.cpp
Dmitriy Ivanov96e0cfa2014-10-07 13:34:42 -070014
15LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
Mike Lockwoode0e9e942012-10-24 11:52:57 -070016
17LOCAL_SHARED_LIBRARIES := \
Andreas Gampecfedceb2014-09-30 21:48:18 -070018 libdl \
19 libcutils \
20 libutils \
21 liblog \
22 libbinder \
Dimitry Ivanovb0824972016-02-22 11:22:11 -080023 libnativeloader \
Christopher Ferrisad817912015-06-17 15:03:20 -070024 libandroid_runtime \
25 $(app_process_common_shared_libs) \
Mike Lockwoode0e9e942012-10-24 11:52:57 -070026
Dmitriy Ivanov5ba317c2014-10-20 14:14:39 -070027LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
28
Mike Lockwoode0e9e942012-10-24 11:52:57 -070029LOCAL_MODULE:= app_process
Colin Crossf130f0a2014-03-27 10:20:29 -070030LOCAL_MULTILIB := both
Yongqin Liu559484e2014-05-06 23:30:40 +080031LOCAL_MODULE_STEM_32 := app_process32
Colin Crossf130f0a2014-03-27 10:20:29 -070032LOCAL_MODULE_STEM_64 := app_process64
Andreas Gampecfedceb2014-09-30 21:48:18 -070033
34LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
35
Mike Lockwoode0e9e942012-10-24 11:52:57 -070036include $(BUILD_EXECUTABLE)
37
Yongqin Liu559484e2014-05-06 23:30:40 +080038# 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
Mike Lockwoode0e9e942012-10-24 11:52:57 -070042# 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:= \
Andreas Gampecfedceb2014-09-30 21:48:18 -070049 app_main.cpp
Mike Lockwoode0e9e942012-10-24 11:52:57 -070050
51LOCAL_SHARED_LIBRARIES := \
Andreas Gampecfedceb2014-09-30 21:48:18 -070052 libcutils \
53 libutils \
54 liblog \
55 libbinder \
Nicolas Geoffray573895b2016-02-26 13:16:50 +000056 libnativeloader \
Christopher Ferrisad817912015-06-17 15:03:20 -070057 libandroid_runtime \
58 $(app_process_common_shared_libs) \
Mike Lockwoode0e9e942012-10-24 11:52:57 -070059
Dmitriy Ivanov5ba317c2014-10-20 14:14:39 -070060LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
61
Dmitriy Ivanov96e0cfa2014-10-07 13:34:42 -070062LOCAL_LDFLAGS := -ldl -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
Dmitriy Ivanov5ba317c2014-10-20 14:14:39 -070063LOCAL_CPPFLAGS := -std=c++11
Dmitriy Ivanov96e0cfa2014-10-07 13:34:42 -070064
Mike Lockwoode0e9e942012-10-24 11:52:57 -070065LOCAL_MODULE := app_process__asan
Evgenii Stepanove740b172015-05-07 10:55:59 -070066LOCAL_MULTILIB := both
67LOCAL_MODULE_STEM_32 := app_process32
68LOCAL_MODULE_STEM_64 := app_process64
69
Dan Albertf98dae52015-06-16 14:06:49 -070070LOCAL_SANITIZE := address
Dan Albertb9f6b0e2015-04-17 10:40:48 -070071LOCAL_CLANG := true
Evgenii Stepanove740b172015-05-07 10:55:59 -070072LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan
Mike Lockwoode0e9e942012-10-24 11:52:57 -070073
Andreas Gampecfedceb2014-09-30 21:48:18 -070074LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
75
Mike Lockwoode0e9e942012-10-24 11:52:57 -070076include $(BUILD_EXECUTABLE)
77
78endif # ifeq($(TARGET_ARCH),arm)