blob: 565ba00be689a1bfbe8479b69466e2c0017adf17 [file] [log] [blame]
Orion Hodson9b16e342019-10-09 13:29:16 +01001cc_defaults {
2 name: "libnativebridge-defaults",
Martin Stjernholm3bb009a2019-10-17 21:29:01 +01003 defaults: ["art_defaults"],
Orion Hodson9b16e342019-10-09 13:29:16 +01004 cppflags: [
5 "-fvisibility=protected",
6 ],
Orion Hodson00cb81d2020-04-03 06:47:07 +01007 header_libs: [
8 "jni_headers",
9 "libnativebridge-headers",
10 ],
11 export_header_lib_headers: [
12 "jni_headers",
13 "libnativebridge-headers",
14 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010015}
16
17cc_library_headers {
18 name: "libnativebridge-headers",
19
20 host_supported: true,
21 export_include_dirs: ["include"],
Jiyong Park71f661c2020-04-28 18:20:43 +090022
23 apex_available: [
24 "//apex_available:platform",
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010025 "com.android.art",
Jiyong Park71f661c2020-04-28 18:20:43 +090026 "com.android.art.debug",
Martin Stjernholm694f0122020-10-30 02:23:24 +000027 "com.android.media",
Jiyong Park71f661c2020-04-28 18:20:43 +090028 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010029}
30
David Srbecky1cf46a32020-06-22 15:39:00 +010031art_cc_library {
Orion Hodson9b16e342019-10-09 13:29:16 +010032 name: "libnativebridge",
33 defaults: ["libnativebridge-defaults"],
Orion Hodsonc78860b2019-10-11 11:30:01 +010034 visibility: [
Orion Hodsonc78860b2019-10-11 11:30:01 +010035 "//frameworks/base/cmds/app_process",
Martin Stjernholm3bb009a2019-10-17 21:29:01 +010036 // TODO(b/133140750): Clean this up.
Orion Hodsonc78860b2019-10-11 11:30:01 +010037 "//frameworks/base/native/webview/loader/libwebviewchromium_loader",
38 ],
Jiyong Park066dd9022019-12-19 02:11:59 +000039 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010040 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +000041 "com.android.art.debug",
42 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010043
44 host_supported: true,
45 srcs: ["native_bridge.cc"],
46 header_libs: [
47 "libbase_headers",
48 ],
49 shared_libs: [
50 "liblog",
51 ],
52 // TODO(jiyong): remove this line after aosp/885921 lands
53 export_include_dirs: ["include"],
54
55 target: {
56 android: {
57 version_script: "libnativebridge.map.txt",
58 },
59 linux: {
60 version_script: "libnativebridge.map.txt",
61 },
62 },
63
64 stubs: {
65 symbol_file: "libnativebridge.map.txt",
66 versions: ["1"],
67 },
68}
69
70// TODO(b/124250621): eliminate the need for this library
71cc_library {
72 name: "libnativebridge_lazy",
73 defaults: ["libnativebridge-defaults"],
Orion Hodsonc78860b2019-10-11 11:30:01 +010074 visibility: [
75 "//art/libnativebridge/tests",
76 "//frameworks/base/core/jni",
77 "//frameworks/native/opengl/libs",
78 "//frameworks/native/vulkan/libvulkan",
79 ],
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000080 apex_available: [
81 "//apex_available:platform",
Martin Stjernholm694f0122020-10-30 02:23:24 +000082 "com.android.media",
83 "com.android.media.swcodec",
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000084 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010085
86 host_supported: false,
87 srcs: ["native_bridge_lazy.cc"],
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000088 runtime_libs: ["libnativebridge"],
Mitch Phillips5472d6f2020-07-01 09:43:16 -070089 shared_libs: ["liblog"],
Orion Hodson9b16e342019-10-09 13:29:16 +010090}
91
92subdirs = ["tests"]