Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
Colin Cross | 2764fce | 2014-03-19 17:47:39 -0700 | [diff] [blame] | 2 | |
Christopher Ferris | ad81791 | 2015-06-17 15:03:20 -0700 | [diff] [blame] | 3 | # 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. |
| 7 | app_process_common_shared_libs := \ |
| 8 | libwilhelm \ |
| 9 | |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 10 | include $(CLEAR_VARS) |
| 11 | |
| 12 | LOCAL_SRC_FILES:= \ |
Andreas Gampe | cfedceb | 2014-09-30 21:48:18 -0700 | [diff] [blame] | 13 | app_main.cpp |
Dmitriy Ivanov | 96e0cfa | 2014-10-07 13:34:42 -0700 | [diff] [blame] | 14 | |
| 15 | LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 16 | |
| 17 | LOCAL_SHARED_LIBRARIES := \ |
Andreas Gampe | cfedceb | 2014-09-30 21:48:18 -0700 | [diff] [blame] | 18 | libdl \ |
| 19 | libcutils \ |
| 20 | libutils \ |
| 21 | liblog \ |
| 22 | libbinder \ |
Dimitry Ivanov | b082497 | 2016-02-22 11:22:11 -0800 | [diff] [blame] | 23 | libnativeloader \ |
Christopher Ferris | ad81791 | 2015-06-17 15:03:20 -0700 | [diff] [blame] | 24 | libandroid_runtime \ |
| 25 | $(app_process_common_shared_libs) \ |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 26 | |
Dmitriy Ivanov | 5ba317c | 2014-10-20 14:14:39 -0700 | [diff] [blame] | 27 | LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain |
| 28 | |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 29 | LOCAL_MODULE:= app_process |
Colin Cross | f130f0a | 2014-03-27 10:20:29 -0700 | [diff] [blame] | 30 | LOCAL_MULTILIB := both |
Yongqin Liu | 559484e | 2014-05-06 23:30:40 +0800 | [diff] [blame] | 31 | LOCAL_MODULE_STEM_32 := app_process32 |
Colin Cross | f130f0a | 2014-03-27 10:20:29 -0700 | [diff] [blame] | 32 | LOCAL_MODULE_STEM_64 := app_process64 |
Andreas Gampe | cfedceb | 2014-09-30 21:48:18 -0700 | [diff] [blame] | 33 | |
| 34 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
| 35 | |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 36 | include $(BUILD_EXECUTABLE) |
| 37 | |
Yongqin Liu | 559484e | 2014-05-06 23:30:40 +0800 | [diff] [blame] | 38 | # Create a symlink from app_process to app_process32 or 64 |
| 39 | # depending on the target configuration. |
| 40 | include $(BUILD_SYSTEM)/executable_prefer_symlink.mk |
| 41 | |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 42 | # Build a variant of app_process binary linked with ASan runtime. |
| 43 | # ARM-only at the moment. |
| 44 | ifeq ($(TARGET_ARCH),arm) |
| 45 | |
| 46 | include $(CLEAR_VARS) |
| 47 | |
| 48 | LOCAL_SRC_FILES:= \ |
Andreas Gampe | cfedceb | 2014-09-30 21:48:18 -0700 | [diff] [blame] | 49 | app_main.cpp |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 50 | |
| 51 | LOCAL_SHARED_LIBRARIES := \ |
Andreas Gampe | cfedceb | 2014-09-30 21:48:18 -0700 | [diff] [blame] | 52 | libcutils \ |
| 53 | libutils \ |
| 54 | liblog \ |
| 55 | libbinder \ |
Nicolas Geoffray | 573895b | 2016-02-26 13:16:50 +0000 | [diff] [blame] | 56 | libnativeloader \ |
Christopher Ferris | ad81791 | 2015-06-17 15:03:20 -0700 | [diff] [blame] | 57 | libandroid_runtime \ |
| 58 | $(app_process_common_shared_libs) \ |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 59 | |
Dmitriy Ivanov | 5ba317c | 2014-10-20 14:14:39 -0700 | [diff] [blame] | 60 | LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain |
| 61 | |
Dmitriy Ivanov | 96e0cfa | 2014-10-07 13:34:42 -0700 | [diff] [blame] | 62 | LOCAL_LDFLAGS := -ldl -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic |
Dmitriy Ivanov | 5ba317c | 2014-10-20 14:14:39 -0700 | [diff] [blame] | 63 | LOCAL_CPPFLAGS := -std=c++11 |
Dmitriy Ivanov | 96e0cfa | 2014-10-07 13:34:42 -0700 | [diff] [blame] | 64 | |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 65 | LOCAL_MODULE := app_process__asan |
Evgenii Stepanov | e740b17 | 2015-05-07 10:55:59 -0700 | [diff] [blame] | 66 | LOCAL_MULTILIB := both |
| 67 | LOCAL_MODULE_STEM_32 := app_process32 |
| 68 | LOCAL_MODULE_STEM_64 := app_process64 |
| 69 | |
Dan Albert | f98dae5 | 2015-06-16 14:06:49 -0700 | [diff] [blame] | 70 | LOCAL_SANITIZE := address |
Dan Albert | b9f6b0e | 2015-04-17 10:40:48 -0700 | [diff] [blame] | 71 | LOCAL_CLANG := true |
Evgenii Stepanov | e740b17 | 2015-05-07 10:55:59 -0700 | [diff] [blame] | 72 | LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)/asan |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 73 | |
Andreas Gampe | cfedceb | 2014-09-30 21:48:18 -0700 | [diff] [blame] | 74 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
| 75 | |
Mike Lockwood | e0e9e94 | 2012-10-24 11:52:57 -0700 | [diff] [blame] | 76 | include $(BUILD_EXECUTABLE) |
| 77 | |
| 78 | endif # ifeq($(TARGET_ARCH),arm) |