blob: fe6a90d655f99399f5788c760cee76e6bcab3cfb [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_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
46san_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
56san_test_c_includes := \
57 external/compiler-rt/lib \
58
59ifneq ($(HOST_OS),darwin)
60
61include $(CLEAR_VARS)
62LOCAL_MODULE := san_test
63LOCAL_CPP_EXTENSION := .cc
64LOCAL_C_INCLUDES := $(san_test_c_includes)
65LOCAL_CPPFLAGS := $(san_test_cppflags)
66LOCAL_SRC_FILES := $(san_test_files)
67LOCAL_STATIC_LIBRARIES := libsan
Pirama Arumuga Nainarcdce50b2015-07-01 12:26:56 -070068LOCAL_LDLIBS := -ldl -lrt
Dan Albert237aaa62015-06-16 14:21:19 -070069LOCAL_SANITIZE := never
Dan Albert92f9e2f2014-12-11 17:39:46 -080070include $(BUILD_HOST_NATIVE_TEST)
71
72include $(CLEAR_VARS)
73LOCAL_MODULE := san_test-Nolibc
74LOCAL_CPP_EXTENSION := .cc
75LOCAL_C_INCLUDES := $(san_test_c_includes) external/gtest/include
76LOCAL_CPPFLAGS := $(san_test_cppflags)
77LOCAL_SRC_FILES := sanitizer_nolibc_test_main.cc
78LOCAL_STATIC_LIBRARIES := libsan libgtest_host
79LOCAL_LDFLAGS := -nostdlib -Qunused-arguments
Pirama Arumuga Nainar799172d2016-03-03 15:50:30 -080080LOCAL_LDLIBS := -ldl -lrt
Dan Albert237aaa62015-06-16 14:21:19 -070081LOCAL_SANITIZE := never
Dan Albert92f9e2f2014-12-11 17:39:46 -080082include $(BUILD_HOST_EXECUTABLE)
83
84endif