Bob Badour | 9150de6 | 2021-02-26 03:22:24 -0800 | [diff] [blame] | 1 | package { |
| 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 Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 10 | cc_defaults { |
| 11 | name: "libnativebridge-defaults", |
Martin Stjernholm | 3bb009a | 2019-10-17 21:29:01 +0100 | [diff] [blame] | 12 | defaults: ["art_defaults"], |
Orion Hodson | 00cb81d | 2020-04-03 06:47:07 +0100 | [diff] [blame] | 13 | header_libs: [ |
| 14 | "jni_headers", |
| 15 | "libnativebridge-headers", |
| 16 | ], |
| 17 | export_header_lib_headers: [ |
| 18 | "jni_headers", |
| 19 | "libnativebridge-headers", |
| 20 | ], |
Orion Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | cc_library_headers { |
| 24 | name: "libnativebridge-headers", |
Martin Stjernholm | e10abe7 | 2021-10-28 03:49:55 +0100 | [diff] [blame] | 25 | defaults: ["art_defaults"], |
Orion Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 26 | host_supported: true, |
| 27 | export_include_dirs: ["include"], |
Jiyong Park | 71f661c | 2020-04-28 18:20:43 +0900 | [diff] [blame] | 28 | |
| 29 | apex_available: [ |
| 30 | "//apex_available:platform", |
Martin Stjernholm | 3e9abfc | 2020-10-09 22:17:51 +0100 | [diff] [blame] | 31 | "com.android.art", |
Jiyong Park | 71f661c | 2020-04-28 18:20:43 +0900 | [diff] [blame] | 32 | "com.android.art.debug", |
Martin Stjernholm | 694f012 | 2020-10-30 02:23:24 +0000 | [diff] [blame] | 33 | "com.android.media", |
Jiyong Park | 71f661c | 2020-04-28 18:20:43 +0900 | [diff] [blame] | 34 | ], |
Orion Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 35 | } |
| 36 | |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 37 | art_cc_library { |
Orion Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 38 | name: "libnativebridge", |
| 39 | defaults: ["libnativebridge-defaults"], |
Orion Hodson | c78860b | 2019-10-11 11:30:01 +0100 | [diff] [blame] | 40 | visibility: [ |
Orion Hodson | c78860b | 2019-10-11 11:30:01 +0100 | [diff] [blame] | 41 | "//frameworks/base/cmds/app_process", |
Martin Stjernholm | 3bb009a | 2019-10-17 21:29:01 +0100 | [diff] [blame] | 42 | // TODO(b/133140750): Clean this up. |
Orion Hodson | c78860b | 2019-10-11 11:30:01 +0100 | [diff] [blame] | 43 | "//frameworks/base/native/webview/loader/libwebviewchromium_loader", |
| 44 | ], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 45 | apex_available: [ |
Martin Stjernholm | 3e9abfc | 2020-10-09 22:17:51 +0100 | [diff] [blame] | 46 | "com.android.art", |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 47 | "com.android.art.debug", |
| 48 | ], |
Orion Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 49 | |
| 50 | host_supported: true, |
| 51 | srcs: ["native_bridge.cc"], |
| 52 | header_libs: [ |
| 53 | "libbase_headers", |
| 54 | ], |
| 55 | shared_libs: [ |
| 56 | "liblog", |
| 57 | ], |
| 58 | // TODO(jiyong): remove this line after aosp/885921 lands |
| 59 | export_include_dirs: ["include"], |
| 60 | |
| 61 | target: { |
| 62 | android: { |
Martin Stjernholm | 2665943 | 2021-04-16 19:55:03 +0100 | [diff] [blame] | 63 | header_libs: [ |
| 64 | "libnativeloader-headers", // For dlext_namespaces.h |
| 65 | ], |
| 66 | shared_libs: ["libdl_android"], |
Orion Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 67 | }, |
| 68 | }, |
| 69 | |
| 70 | stubs: { |
| 71 | symbol_file: "libnativebridge.map.txt", |
| 72 | versions: ["1"], |
| 73 | }, |
| 74 | } |
| 75 | |
| 76 | // TODO(b/124250621): eliminate the need for this library |
| 77 | cc_library { |
| 78 | name: "libnativebridge_lazy", |
| 79 | defaults: ["libnativebridge-defaults"], |
Orion Hodson | c78860b | 2019-10-11 11:30:01 +0100 | [diff] [blame] | 80 | visibility: [ |
| 81 | "//art/libnativebridge/tests", |
| 82 | "//frameworks/base/core/jni", |
| 83 | "//frameworks/native/opengl/libs", |
| 84 | "//frameworks/native/vulkan/libvulkan", |
| 85 | ], |
Martin Stjernholm | b5ed330 | 2020-10-30 02:27:23 +0000 | [diff] [blame] | 86 | apex_available: [ |
| 87 | "//apex_available:platform", |
Martin Stjernholm | 694f012 | 2020-10-30 02:23:24 +0000 | [diff] [blame] | 88 | "com.android.media", |
| 89 | "com.android.media.swcodec", |
Martin Stjernholm | b5ed330 | 2020-10-30 02:27:23 +0000 | [diff] [blame] | 90 | ], |
Orion Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 91 | |
| 92 | host_supported: false, |
| 93 | srcs: ["native_bridge_lazy.cc"], |
Martin Stjernholm | b5ed330 | 2020-10-30 02:27:23 +0000 | [diff] [blame] | 94 | runtime_libs: ["libnativebridge"], |
Mitch Phillips | 5472d6f | 2020-07-01 09:43:16 -0700 | [diff] [blame] | 95 | shared_libs: ["liblog"], |
Orion Hodson | 9b16e34 | 2019-10-09 13:29:16 +0100 | [diff] [blame] | 96 | } |
| 97 | |
| 98 | subdirs = ["tests"] |