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_test_files := \ |
| 21 | sanitizer_allocator_test.cc \ |
| 22 | sanitizer_atomic_test.cc \ |
| 23 | sanitizer_bitvector_test.cc \ |
| 24 | sanitizer_bvgraph_test.cc \ |
| 25 | sanitizer_common_test.cc \ |
| 26 | sanitizer_deadlock_detector_test.cc \ |
| 27 | sanitizer_flags_test.cc \ |
| 28 | sanitizer_format_interceptor_test.cc \ |
| 29 | sanitizer_ioctl_test.cc \ |
| 30 | sanitizer_libc_test.cc \ |
| 31 | sanitizer_linux_test.cc \ |
| 32 | sanitizer_list_test.cc \ |
| 33 | sanitizer_mutex_test.cc \ |
| 34 | sanitizer_nolibc_test.cc \ |
| 35 | sanitizer_posix_test.cc \ |
| 36 | sanitizer_printf_test.cc \ |
| 37 | sanitizer_procmaps_test.cc \ |
| 38 | sanitizer_stackdepot_test.cc \ |
| 39 | sanitizer_stacktrace_printer_test.cc \ |
| 40 | sanitizer_stacktrace_test.cc \ |
| 41 | sanitizer_stoptheworld_test.cc \ |
| 42 | sanitizer_suppressions_test.cc \ |
| 43 | sanitizer_test_main.cc \ |
| 44 | sanitizer_thread_registry_test.cc \ |
| 45 | |
| 46 | san_test_cppflags := \ |
| 47 | -fvisibility=hidden \ |
| 48 | -fno-exceptions \ |
| 49 | -fno-rtti \ |
| 50 | -std=c++11 \ |
| 51 | -Wall \ |
| 52 | -Werror \ |
| 53 | -Wno-unused-parameter \ |
| 54 | -Wno-non-virtual-dtor \ |
| 55 | |
| 56 | san_test_c_includes := \ |
| 57 | external/compiler-rt/lib \ |
| 58 | |
| 59 | ifneq ($(HOST_OS),darwin) |
| 60 | |
| 61 | include $(CLEAR_VARS) |
| 62 | LOCAL_MODULE := san_test |
| 63 | LOCAL_CPP_EXTENSION := .cc |
| 64 | LOCAL_C_INCLUDES := $(san_test_c_includes) |
| 65 | LOCAL_CPPFLAGS := $(san_test_cppflags) |
| 66 | LOCAL_SRC_FILES := $(san_test_files) |
| 67 | LOCAL_STATIC_LIBRARIES := libsan |
Pirama Arumuga Nainar | cdce50b | 2015-07-01 12:26:56 -0700 | [diff] [blame] | 68 | LOCAL_LDLIBS := -ldl -lrt |
Dan Albert | 237aaa6 | 2015-06-16 14:21:19 -0700 | [diff] [blame] | 69 | LOCAL_SANITIZE := never |
Dan Albert | 92f9e2f | 2014-12-11 17:39:46 -0800 | [diff] [blame] | 70 | include $(BUILD_HOST_NATIVE_TEST) |
| 71 | |
| 72 | include $(CLEAR_VARS) |
| 73 | LOCAL_MODULE := san_test-Nolibc |
| 74 | LOCAL_CPP_EXTENSION := .cc |
| 75 | LOCAL_C_INCLUDES := $(san_test_c_includes) external/gtest/include |
| 76 | LOCAL_CPPFLAGS := $(san_test_cppflags) |
| 77 | LOCAL_SRC_FILES := sanitizer_nolibc_test_main.cc |
| 78 | LOCAL_STATIC_LIBRARIES := libsan libgtest_host |
| 79 | LOCAL_LDFLAGS := -nostdlib -Qunused-arguments |
Pirama Arumuga Nainar | 799172d | 2016-03-03 15:50:30 -0800 | [diff] [blame^] | 80 | LOCAL_LDLIBS := -ldl -lrt |
Dan Albert | 237aaa6 | 2015-06-16 14:21:19 -0700 | [diff] [blame] | 81 | LOCAL_SANITIZE := never |
Dan Albert | 92f9e2f | 2014-12-11 17:39:46 -0800 | [diff] [blame] | 82 | include $(BUILD_HOST_EXECUTABLE) |
| 83 | |
| 84 | endif |