aboutsummaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests/Android.bp
blob: b82c2deb4d2a6dbb9a3833d05208da2573a9820e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

cc_defaults {
    name: "san_test_defaults",

    cflags: [
        "-Wall",
        "-Werror",
    ],
    cppflags: [
        "-fvisibility=hidden",
        "-fno-exceptions",
        "-fno-rtti",
        "-std=c++11",
        "-Wno-unused-parameter",
        "-Wno-non-virtual-dtor",
        "-Wno-format",
    ],

    include_dirs: ["external/compiler-rt/lib"],
}


cc_test_host {
    name: "san_test",
    defaults: ["san_test_defaults"],

    srcs: [
        "sanitizer_allocator_test.cc",
        "sanitizer_atomic_test.cc",
        "sanitizer_bitvector_test.cc",
        "sanitizer_bvgraph_test.cc",
        "sanitizer_common_test.cc",
        "sanitizer_deadlock_detector_test.cc",
        "sanitizer_flags_test.cc",
        "sanitizer_format_interceptor_test.cc",
        "sanitizer_ioctl_test.cc",
        "sanitizer_libc_test.cc",
        "sanitizer_linux_test.cc",
        "sanitizer_list_test.cc",
        "sanitizer_mutex_test.cc",
        "sanitizer_nolibc_test.cc",
        "sanitizer_posix_test.cc",
        "sanitizer_printf_test.cc",
        "sanitizer_procmaps_test.cc",
        "sanitizer_stackdepot_test.cc",
        "sanitizer_stacktrace_printer_test.cc",
        "sanitizer_stacktrace_test.cc",
        "sanitizer_stoptheworld_test.cc",
        "sanitizer_suppressions_test.cc",
        "sanitizer_test_main.cc",
        "sanitizer_thread_registry_test.cc",
    ],
    static_libs: ["libsan"],
    sanitize: {
        never: true,
    },
    target: {
        darwin: {
            enabled: false,
        },
    },
}

cc_binary_host {
    name: "san_test-Nolibc",
    defaults: ["san_test_defaults"],

    srcs: ["sanitizer_nolibc_test_main.cc"],
    static_libs: [
        "libsan",
        "libgtest_host",
    ],
    ldflags: [
        "-nostdlib",
        "-Qunused-arguments",
    ],
    sanitize: {
        never: true,
    },
    target: {
        darwin: {
            enabled: false,
        },
    },
}