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
| // Build the unit tests.
|
| cc_test {
| name: "JniInvocation_test",
| test_suites: ["device-tests"],
| host_supported: true,
| srcs: ["JniInvocation_test.cpp"],
| cflags: ["-Wall", "-Werror"],
| // Link to the non-stub version of the library to access some internal
| // functions.
| bootstrap: true,
| shared_libs: ["libnativehelper"],
| }
|
| cc_test {
| name: "JniSafeRegisterNativeMethods_test",
| host_supported: true,
| srcs: ["JniSafeRegisterNativeMethods_test.cpp"],
|
| cflags: [
| // Base set of cflags used by all things ART.
| "-fno-rtti",
| "-ggdb3",
| "-Wall",
| "-Werror",
| "-Wextra",
| "-Wstrict-aliasing",
| "-fstrict-aliasing",
| "-Wunreachable-code",
| "-Wredundant-decls",
| "-Wshadow",
| "-Wunused",
| "-fvisibility=protected",
|
| // Warn about thread safety violations with clang.
| "-Wthread-safety",
| "-Wthread-safety-negative",
|
| // Warn if switch fallthroughs aren't annotated.
| "-Wimplicit-fallthrough",
|
| // Enable float equality warnings.
| "-Wfloat-equal",
|
| // Enable warning of converting ints to void*.
| "-Wint-to-void-pointer-cast",
|
| // Enable warning of wrong unused annotations.
| "-Wused-but-marked-unused",
|
| // Enable warning for deprecated language features.
| "-Wdeprecated",
|
| // Enable warning for unreachable break & return.
| "-Wunreachable-code-break",
| "-Wunreachable-code-return",
|
| // Enable thread annotations for std::mutex, etc.
| "-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS",
| ],
|
| tidy: true,
|
| shared_libs: ["libnativehelper"],
| }
|
| cc_test {
| name: "libnativehelper_api_test",
| host_supported: true,
| cflags: ["-Wall", "-Werror"],
| srcs: ["libnativehelper_api_test.c"], // C Compilation test.
| tidy: true,
| shared_libs: ["libnativehelper"],
| }
|
|