blob: 7b66d4401af22d0139907e7075c184bbbc68cabf [file] [log] [blame]
Colin Cross7add50d2016-01-14 15:35:40 -08001LOCAL_PATH := $(call my-dir)
2
3memunreachable_srcs := \
4 Allocator.cpp \
5 HeapWalker.cpp \
Colin Cross8e8f34c2016-03-02 17:53:39 -08006 LeakFolding.cpp \
Colin Cross7add50d2016-01-14 15:35:40 -08007 LeakPipe.cpp \
8 LineBuffer.cpp \
9 MemUnreachable.cpp \
10 ProcessMappings.cpp \
11 PtracerThread.cpp \
12 ThreadCapture.cpp \
13
14memunreachable_test_srcs := \
15 tests/Allocator_test.cpp \
Colin Crossb8e20f52016-03-02 17:52:56 -080016 tests/DisableMalloc_test.cpp \
Colin Cross7add50d2016-01-14 15:35:40 -080017 tests/HeapWalker_test.cpp \
Colin Cross8e8f34c2016-03-02 17:53:39 -080018 tests/LeakFolding_test.cpp \
Colin Cross7add50d2016-01-14 15:35:40 -080019 tests/MemUnreachable_test.cpp \
20 tests/ThreadCapture_test.cpp \
21
22include $(CLEAR_VARS)
23
24LOCAL_MODULE := libmemunreachable
25LOCAL_SRC_FILES := $(memunreachable_srcs)
26LOCAL_CFLAGS := -std=c++14 -Wall -Wextra -Werror
27LOCAL_SHARED_LIBRARIES := libbase liblog
28LOCAL_STATIC_LIBRARIES := libc_malloc_debug_backtrace libc_logging
29# Only need this for arm since libc++ uses its own unwind code that
30# doesn't mix with the other default unwind code.
31LOCAL_STATIC_LIBRARIES_arm := libunwind_llvm
32LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
33LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
34LOCAL_CLANG := true
35
36include $(BUILD_SHARED_LIBRARY)
37
38include $(CLEAR_VARS)
39
40LOCAL_MODULE := memunreachable_test
41LOCAL_SRC_FILES := $(memunreachable_test_srcs)
42LOCAL_CFLAGS := -std=c++14 -Wall -Wextra -Werror
43LOCAL_CLANG := true
44LOCAL_SHARED_LIBRARIES := libmemunreachable libbase liblog
45
46include $(BUILD_NATIVE_TEST)
Colin Crossb8e20f52016-03-02 17:52:56 -080047
48include $(CLEAR_VARS)
49
50LOCAL_MODULE := memunreachable_test
51LOCAL_SRC_FILES := \
52 Allocator.cpp \
53 HeapWalker.cpp \
Colin Cross8e8f34c2016-03-02 17:53:39 -080054 LeakFolding.cpp \
Colin Crossb8e20f52016-03-02 17:52:56 -080055 tests/Allocator_test.cpp \
56 tests/HeapWalker_test.cpp \
57 tests/HostMallocStub.cpp \
Colin Cross8e8f34c2016-03-02 17:53:39 -080058 tests/LeakFolding_test.cpp \
Colin Crossb8e20f52016-03-02 17:52:56 -080059
60LOCAL_CFLAGS := -std=c++14 -Wall -Wextra -Werror
61LOCAL_CLANG := true
62LOCAL_SHARED_LIBRARIES := libbase liblog
Colin Crosse33686b2016-03-07 17:19:28 -080063LOCAL_MODULE_HOST_OS := linux
Colin Crossb8e20f52016-03-02 17:52:56 -080064
65include $(BUILD_HOST_NATIVE_TEST)