aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Android.bp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Android.bp')
-rw-r--r--tests/Android.bp50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/Android.bp b/tests/Android.bp
index e6cbf5c..a5bdee9 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -8,3 +8,53 @@ cc_test {
cflags: ["-Wall", "-Werror"],
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",
+ ],
+
+ shared_libs: ["libnativehelper"],
+}