blob: bea9e0cb2b8543c856ff0d9a8b68ceb2e7ee2557 [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 \
Pirama Arumuga Nainar799172d2016-03-03 15:50:30 -080061 sanitizer_unwind_linux_libcdep.cc \
Dan Albert92f9e2f2014-12-11 17:39:46 -080062
63san_rtl_cppflags := \
64 -fvisibility=hidden \
65 -fno-exceptions \
66 -std=c++11 \
67 -Wall \
68 -Werror \
69 -Wno-unused-parameter \
70
71san_rtl_c_includes := \
72 external/compiler-rt/lib \
73
Pirama Arumuga Nainar259f7062015-05-06 11:49:53 -070074################################################################################
75# Host modules
76
Dan Albert92f9e2f2014-12-11 17:39:46 -080077ifneq ($(HOST_OS),darwin)
78
79include $(CLEAR_VARS)
80LOCAL_MODULE := libsan
81LOCAL_CPP_EXTENSION := .cc
82LOCAL_C_INCLUDES := $(san_rtl_c_includes)
83LOCAL_CPPFLAGS := $(san_rtl_cppflags)
84LOCAL_SRC_FILES := $(san_rtl_files) $(san_cdep_files)
85LOCAL_CXX_STL := none
Dan Albert237aaa62015-06-16 14:21:19 -070086LOCAL_SANITIZE := never
Dan Albert92f9e2f2014-12-11 17:39:46 -080087LOCAL_MULTILIB := both
88include $(BUILD_HOST_STATIC_LIBRARY)
89
90endif
91
Dan Albert6de3e082015-08-14 23:35:15 -070092ifndef SANITIZE_HOST
Dan Albert92f9e2f2014-12-11 17:39:46 -080093include $(LOCAL_PATH)/tests/Android.mk
Dan Albert6de3e082015-08-14 23:35:15 -070094endif