• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
18cc_defaults {
19    name: "san_test_defaults",
20
21    cppflags: [
22        "-fvisibility=hidden",
23        "-fno-exceptions",
24        "-fno-rtti",
25        "-std=c++11",
26        "-Wall",
27        "-Werror",
28        "-Wno-unused-parameter",
29        "-Wno-non-virtual-dtor",
30    ],
31
32    include_dirs: ["external/compiler-rt/lib"],
33}
34
35
36cc_test_host {
37    name: "san_test",
38    defaults: ["san_test_defaults"],
39
40    srcs: [
41        "sanitizer_allocator_test.cc",
42        "sanitizer_atomic_test.cc",
43        "sanitizer_bitvector_test.cc",
44        "sanitizer_bvgraph_test.cc",
45        "sanitizer_common_test.cc",
46        "sanitizer_deadlock_detector_test.cc",
47        "sanitizer_flags_test.cc",
48        "sanitizer_format_interceptor_test.cc",
49        "sanitizer_ioctl_test.cc",
50        "sanitizer_libc_test.cc",
51        "sanitizer_linux_test.cc",
52        "sanitizer_list_test.cc",
53        "sanitizer_mutex_test.cc",
54        "sanitizer_nolibc_test.cc",
55        "sanitizer_posix_test.cc",
56        "sanitizer_printf_test.cc",
57        "sanitizer_procmaps_test.cc",
58        "sanitizer_stackdepot_test.cc",
59        "sanitizer_stacktrace_printer_test.cc",
60        "sanitizer_stacktrace_test.cc",
61        "sanitizer_stoptheworld_test.cc",
62        "sanitizer_suppressions_test.cc",
63        "sanitizer_test_main.cc",
64        "sanitizer_thread_registry_test.cc",
65    ],
66    static_libs: ["libsan"],
67    host_ldlibs: [
68        "-ldl",
69        "-lrt",
70    ],
71    sanitize: {
72        never: true,
73    },
74    target: {
75        darwin: {
76            enabled: false,
77        },
78    },
79}
80
81cc_binary_host {
82    name: "san_test-Nolibc",
83    defaults: ["san_test_defaults"],
84
85    srcs: ["sanitizer_nolibc_test_main.cc"],
86    static_libs: [
87        "libsan",
88        "libgtest_host",
89    ],
90    ldflags: [
91        "-nostdlib",
92        "-Qunused-arguments",
93    ],
94    host_ldlibs: [
95        "-ldl",
96        "-lrt",
97    ],
98    sanitize: {
99        never: true,
100    },
101    target: {
102        darwin: {
103            enabled: false,
104        },
105    },
106}
107