1cc_defaults {
2    name: "libnativebridge-defaults",
3    defaults: ["art_defaults"],
4    cppflags: [
5        "-fvisibility=protected",
6    ],
7    header_libs: [
8        "jni_headers",
9        "libnativebridge-headers",
10    ],
11    export_header_lib_headers: [
12        "jni_headers",
13        "libnativebridge-headers",
14    ],
15}
16
17cc_library_headers {
18    name: "libnativebridge-headers",
19
20    host_supported: true,
21    export_include_dirs: ["include"],
22
23    apex_available: [
24        "//apex_available:platform",
25        "com.android.art.debug",
26        "com.android.art.release",
27    ],
28}
29
30art_cc_library {
31    name: "libnativebridge",
32    defaults: ["libnativebridge-defaults"],
33    visibility: [
34        "//frameworks/base/cmds/app_process",
35        // TODO(b/133140750): Clean this up.
36        "//frameworks/base/native/webview/loader/libwebviewchromium_loader",
37    ],
38    apex_available: [
39        "com.android.art.release",
40        "com.android.art.debug",
41    ],
42
43    host_supported: true,
44    srcs: ["native_bridge.cc"],
45    header_libs: [
46        "libbase_headers",
47    ],
48    shared_libs: [
49        "liblog",
50    ],
51    // TODO(jiyong): remove this line after aosp/885921 lands
52    export_include_dirs: ["include"],
53
54    target: {
55        android: {
56            version_script: "libnativebridge.map.txt",
57        },
58        linux: {
59            version_script: "libnativebridge.map.txt",
60        },
61    },
62
63    stubs: {
64        symbol_file: "libnativebridge.map.txt",
65        versions: ["1"],
66    },
67}
68
69// TODO(b/124250621): eliminate the need for this library
70cc_library {
71    name: "libnativebridge_lazy",
72    defaults: ["libnativebridge-defaults"],
73    visibility: [
74        "//art/libnativebridge/tests",
75        "//frameworks/base/core/jni",
76        "//frameworks/native/opengl/libs",
77        "//frameworks/native/vulkan/libvulkan",
78    ],
79
80    host_supported: false,
81    srcs: ["native_bridge_lazy.cc"],
82    required: ["libnativebridge"],
83    shared_libs: ["liblog"],
84}
85
86subdirs = ["tests"]
87