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