blob: 9f65eb6f361bc018644adbc85a78f84fb91ca923 [file] [log] [blame]
Bob Badour9150de62021-02-26 03:22:24 -08001package {
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}
9
Orion Hodson9b16e342019-10-09 13:29:16 +010010cc_defaults {
11 name: "libnativebridge-defaults",
Martin Stjernholm3bb009a2019-10-17 21:29:01 +010012 defaults: ["art_defaults"],
Orion Hodson9b16e342019-10-09 13:29:16 +010013 cppflags: [
14 "-fvisibility=protected",
15 ],
Orion Hodson00cb81d2020-04-03 06:47:07 +010016 header_libs: [
17 "jni_headers",
18 "libnativebridge-headers",
19 ],
20 export_header_lib_headers: [
21 "jni_headers",
22 "libnativebridge-headers",
23 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010024}
25
26cc_library_headers {
27 name: "libnativebridge-headers",
28
29 host_supported: true,
30 export_include_dirs: ["include"],
Jiyong Park71f661c2020-04-28 18:20:43 +090031
32 apex_available: [
33 "//apex_available:platform",
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010034 "com.android.art",
Jiyong Park71f661c2020-04-28 18:20:43 +090035 "com.android.art.debug",
Martin Stjernholm694f0122020-10-30 02:23:24 +000036 "com.android.media",
Jiyong Park71f661c2020-04-28 18:20:43 +090037 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010038}
39
David Srbecky1cf46a32020-06-22 15:39:00 +010040art_cc_library {
Orion Hodson9b16e342019-10-09 13:29:16 +010041 name: "libnativebridge",
42 defaults: ["libnativebridge-defaults"],
Orion Hodsonc78860b2019-10-11 11:30:01 +010043 visibility: [
Orion Hodsonc78860b2019-10-11 11:30:01 +010044 "//frameworks/base/cmds/app_process",
Martin Stjernholm3bb009a2019-10-17 21:29:01 +010045 // TODO(b/133140750): Clean this up.
Orion Hodsonc78860b2019-10-11 11:30:01 +010046 "//frameworks/base/native/webview/loader/libwebviewchromium_loader",
47 ],
Jiyong Park066dd9022019-12-19 02:11:59 +000048 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010049 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +000050 "com.android.art.debug",
51 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010052
53 host_supported: true,
54 srcs: ["native_bridge.cc"],
55 header_libs: [
56 "libbase_headers",
57 ],
58 shared_libs: [
59 "liblog",
60 ],
61 // TODO(jiyong): remove this line after aosp/885921 lands
62 export_include_dirs: ["include"],
63
64 target: {
65 android: {
66 version_script: "libnativebridge.map.txt",
67 },
68 linux: {
69 version_script: "libnativebridge.map.txt",
70 },
71 },
72
73 stubs: {
74 symbol_file: "libnativebridge.map.txt",
75 versions: ["1"],
76 },
77}
78
79// TODO(b/124250621): eliminate the need for this library
80cc_library {
81 name: "libnativebridge_lazy",
82 defaults: ["libnativebridge-defaults"],
Orion Hodsonc78860b2019-10-11 11:30:01 +010083 visibility: [
84 "//art/libnativebridge/tests",
85 "//frameworks/base/core/jni",
86 "//frameworks/native/opengl/libs",
87 "//frameworks/native/vulkan/libvulkan",
88 ],
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000089 apex_available: [
90 "//apex_available:platform",
Martin Stjernholm694f0122020-10-30 02:23:24 +000091 "com.android.media",
92 "com.android.media.swcodec",
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000093 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010094
95 host_supported: false,
96 srcs: ["native_bridge_lazy.cc"],
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000097 runtime_libs: ["libnativebridge"],
Mitch Phillips5472d6f2020-07-01 09:43:16 -070098 shared_libs: ["liblog"],
Orion Hodson9b16e342019-10-09 13:29:16 +010099}
100
101subdirs = ["tests"]