Dan Albert | 92f9e2f | 2014-12-11 17:39:46 -0800 | [diff] [blame] | 1 | # |
| 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 | |
| 18 | LOCAL_PATH:= $(call my-dir) |
| 19 | |
| 20 | san_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 | |
| 51 | san_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 Nainar | 799172d | 2016-03-03 15:50:30 -0800 | [diff] [blame^] | 61 | sanitizer_unwind_linux_libcdep.cc \ |
Dan Albert | 92f9e2f | 2014-12-11 17:39:46 -0800 | [diff] [blame] | 62 | |
| 63 | san_rtl_cppflags := \ |
| 64 | -fvisibility=hidden \ |
| 65 | -fno-exceptions \ |
| 66 | -std=c++11 \ |
| 67 | -Wall \ |
| 68 | -Werror \ |
| 69 | -Wno-unused-parameter \ |
| 70 | |
| 71 | san_rtl_c_includes := \ |
| 72 | external/compiler-rt/lib \ |
| 73 | |
Pirama Arumuga Nainar | 259f706 | 2015-05-06 11:49:53 -0700 | [diff] [blame] | 74 | ################################################################################ |
| 75 | # Host modules |
| 76 | |
Dan Albert | 92f9e2f | 2014-12-11 17:39:46 -0800 | [diff] [blame] | 77 | ifneq ($(HOST_OS),darwin) |
| 78 | |
| 79 | include $(CLEAR_VARS) |
| 80 | LOCAL_MODULE := libsan |
| 81 | LOCAL_CPP_EXTENSION := .cc |
| 82 | LOCAL_C_INCLUDES := $(san_rtl_c_includes) |
| 83 | LOCAL_CPPFLAGS := $(san_rtl_cppflags) |
| 84 | LOCAL_SRC_FILES := $(san_rtl_files) $(san_cdep_files) |
| 85 | LOCAL_CXX_STL := none |
Dan Albert | 237aaa6 | 2015-06-16 14:21:19 -0700 | [diff] [blame] | 86 | LOCAL_SANITIZE := never |
Dan Albert | 92f9e2f | 2014-12-11 17:39:46 -0800 | [diff] [blame] | 87 | LOCAL_MULTILIB := both |
| 88 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 89 | |
| 90 | endif |
| 91 | |
Dan Albert | 6de3e08 | 2015-08-14 23:35:15 -0700 | [diff] [blame] | 92 | ifndef SANITIZE_HOST |
Dan Albert | 92f9e2f | 2014-12-11 17:39:46 -0800 | [diff] [blame] | 93 | include $(LOCAL_PATH)/tests/Android.mk |
Dan Albert | 6de3e08 | 2015-08-14 23:35:15 -0700 | [diff] [blame] | 94 | endif |