• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "art_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["art_license"],
8    default_team: "trendy_team_art_mainline",
9}
10
11cc_defaults {
12    name: "libnativebridge-defaults",
13    defaults: ["art_defaults"],
14    header_libs: [
15        "jni_headers",
16        "libnativebridge-headers",
17    ],
18    export_header_lib_headers: [
19        "jni_headers",
20        "libnativebridge-headers",
21    ],
22}
23
24cc_library_headers {
25    name: "libnativebridge-headers",
26    defaults: ["art_defaults"],
27    host_supported: true,
28    export_include_dirs: ["include"],
29
30    apex_available: [
31        "//apex_available:platform",
32        "com.android.art",
33        "com.android.art.debug",
34        "com.android.media",
35    ],
36}
37
38art_cc_library {
39    name: "libnativebridge",
40    defaults: ["libnativebridge-defaults"],
41    visibility: [
42        "//frameworks/base/cmds/app_process",
43        // TODO(b/133140750): Clean this up.
44        "//frameworks/base/native/webview/loader/libwebviewchromium_loader",
45    ],
46    apex_available: [
47        "com.android.art",
48        "com.android.art.debug",
49        "test_broken_com.android.art",
50    ],
51
52    host_supported: true,
53    srcs: ["native_bridge.cc"],
54    header_libs: [
55        "libbase_headers",
56    ],
57    shared_libs: [
58        "liblog",
59    ],
60    // TODO(jiyong): remove this line after aosp/885921 lands
61    export_include_dirs: ["include"],
62
63    target: {
64        android: {
65            header_libs: [
66                "libnativeloader-headers", // For dlext_namespaces.h
67            ],
68            shared_libs: ["libdl_android"],
69        },
70    },
71
72    stubs: {
73        symbol_file: "libnativebridge.map.txt",
74        versions: ["1"],
75    },
76}
77
78// TODO(b/124250621): eliminate the need for this library
79cc_library {
80    name: "libnativebridge_lazy",
81    defaults: ["libnativebridge-defaults"],
82    visibility: [
83        "//art/libnativebridge/tests",
84        "//frameworks/base/core/jni",
85        "//frameworks/native/opengl/libs",
86        "//frameworks/native/vulkan/libvulkan",
87    ],
88    apex_available: [
89        "//apex_available:platform",
90        "com.android.media",
91        "com.android.media.swcodec",
92    ],
93
94    host_supported: false,
95    srcs: ["native_bridge_lazy.cc"],
96    runtime_libs: ["libnativebridge"],
97    shared_libs: ["liblog"],
98}
99
100subdirs = ["tests"]
101