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