blob: 2323bffaa3f26130a5a48326bfd15a31ec11a2fc [file] [log] [blame]
Dan Albert92f9e2f2014-12-11 17:39:46 -08001#
2# Copyright (C) 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16#
17
18LOCAL_PATH:= $(call my-dir)
19
20san_rtl_files := \
21 sanitizer_allocator.cc \
22 sanitizer_common.cc \
23 sanitizer_deadlock_detector1.cc \
24 sanitizer_deadlock_detector2.cc \
25 sanitizer_flags.cc \
26 sanitizer_flag_parser.cc \
27 sanitizer_libc.cc \
28 sanitizer_libignore.cc \
29 sanitizer_linux.cc \
30 sanitizer_mac.cc \
31 sanitizer_persistent_allocator.cc \
32 sanitizer_platform_limits_linux.cc \
33 sanitizer_platform_limits_posix.cc \
34 sanitizer_posix.cc \
35 sanitizer_printf.cc \
36 sanitizer_procmaps_common.cc \
37 sanitizer_procmaps_freebsd.cc \
38 sanitizer_procmaps_linux.cc \
39 sanitizer_procmaps_mac.cc \
40 sanitizer_stackdepot.cc \
41 sanitizer_stacktrace.cc \
42 sanitizer_stacktrace_printer.cc \
43 sanitizer_suppressions.cc \
44 sanitizer_symbolizer.cc \
45 sanitizer_symbolizer_libbacktrace.cc \
46 sanitizer_symbolizer_win.cc \
47 sanitizer_tls_get_addr.cc \
48 sanitizer_thread_registry.cc \
49 sanitizer_win.cc \
50
51san_cdep_files := \
52 sanitizer_common_libcdep.cc \
53 sanitizer_coverage_libcdep.cc \
54 sanitizer_coverage_mapping_libcdep.cc \
55 sanitizer_linux_libcdep.cc \
56 sanitizer_posix_libcdep.cc \
57 sanitizer_stacktrace_libcdep.cc \
58 sanitizer_stoptheworld_linux_libcdep.cc \
59 sanitizer_symbolizer_libcdep.cc \
60 sanitizer_symbolizer_posix_libcdep.cc \
61 sanitizer_symbolizer_process_libcdep.cc \
62 sanitizer_unwind_posix_libcdep.cc \
63
64san_rtl_cppflags := \
65 -fvisibility=hidden \
66 -fno-exceptions \
67 -std=c++11 \
68 -Wall \
69 -Werror \
70 -Wno-unused-parameter \
71
72san_rtl_c_includes := \
73 external/compiler-rt/lib \
74
Pirama Arumuga Nainar259f7062015-05-06 11:49:53 -070075################################################################################
76# Host modules
77
Dan Albert92f9e2f2014-12-11 17:39:46 -080078ifneq ($(HOST_OS),darwin)
79
80include $(CLEAR_VARS)
81LOCAL_MODULE := libsan
82LOCAL_CPP_EXTENSION := .cc
83LOCAL_C_INCLUDES := $(san_rtl_c_includes)
84LOCAL_CPPFLAGS := $(san_rtl_cppflags)
85LOCAL_SRC_FILES := $(san_rtl_files) $(san_cdep_files)
86LOCAL_CXX_STL := none
Dan Albert237aaa62015-06-16 14:21:19 -070087LOCAL_SANITIZE := never
Dan Albert92f9e2f2014-12-11 17:39:46 -080088LOCAL_MULTILIB := both
89include $(BUILD_HOST_STATIC_LIBRARY)
90
91endif
92
Dan Albert6de3e082015-08-14 23:35:15 -070093ifndef SANITIZE_HOST
Dan Albert92f9e2f2014-12-11 17:39:46 -080094include $(LOCAL_PATH)/tests/Android.mk
Dan Albert6de3e082015-08-14 23:35:15 -070095endif