File: Android.bp

package info (click to toggle)
android-platform-tools 34.0.5-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 150,900 kB
  • sloc: cpp: 805,786; java: 293,500; ansic: 128,288; xml: 127,491; python: 41,481; sh: 14,245; javascript: 9,665; cs: 3,846; asm: 2,049; makefile: 1,917; yacc: 440; awk: 368; ruby: 183; sql: 140; perl: 88; lex: 67
file content (103 lines) | stat: -rw-r--r-- 3,074 bytes parent folder | download | duplicates (2)
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
102
103
// Build the unit tests.

package {
    // http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // the below license kinds from "libnativehelper_license":
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["libnativehelper_license"],
}

cc_defaults {
    name: "libnativehelper_test_defaults",
    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 for deprecated language features.
        "-Wdeprecated",

        // Disable warning from external/libcxxabi/include/cxxabi.h
        "-Wno-deprecated-dynamic-exception-spec",

        // 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",
    ],
    host_supported: true,
    test_options: {
        unit_test: true,
    },
    tidy: true,
}

cc_test {
    name: "libnativehelper_tests",
    defaults: ["libnativehelper_test_defaults"],
    test_suites: ["general-tests"],
    srcs: [
        "scoped_local_frame_test.cpp",
        "scoped_local_ref_test.cpp",
        "scoped_primitive_array_test.cpp",
        "libnativehelper_api_test.c",
        "JniSafeRegisterNativeMethods_test.cpp",
    ],
    shared_libs: ["libnativehelper"],
}

cc_test {
    name: "libnativehelper_lazy_tests",
    defaults: ["libnativehelper_test_defaults"],
    test_suites: ["general-tests"],
    srcs: ["libnativehelper_lazy_test.cpp"],
    shared_libs: ["liblog"],
    static_libs: ["libnativehelper_lazy"],
}

// Tests for internal functions that aren't present in the APEX stub API. Use
// `bootstrap:true` to bypass the stub library. This test won't link when
// prebuilts are preferred, because we cannot link against the source variant
// then.
// TODO(b/180107266): Enable in TEST_MAPPING. Also use a better way than
// `bootstrap:true` - `test_for` ought to work but fails because the test is
// host enabled so host variants of the APEXes are expected.
cc_test {
    name: "libnativehelper_internal_tests",
    defaults: [
        "art_module_source_build_defaults",
        "libnativehelper_test_defaults",
    ],
    srcs: [
        "ExpandableString_test.cpp",
        "JniInvocation_test.cpp",
    ],
    bootstrap: true,
    shared_libs: ["libnativehelper"],
}