1# 2# Copyright 2020 The Android Open-Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17# 18# This makefile exports 19# 20# NATIVE_BRIDGE_PRODUCT_PACKAGES: Add this to PRODUCT_PACKAGES for your project to facilitate 21# native bridge support. 22# 23# NATIVE_BRIDGE_MODIFIED_GUEST_LIBS: List of modified guest libraries that require host counterpart. 24# 25 26NATIVE_BRIDGE_PRODUCT_PACKAGES := \ 27 libnative_bridge_vdso.native_bridge \ 28 native_bridge_guest_app_process.native_bridge \ 29 native_bridge_guest_linker.native_bridge 30 31# TODO(b/141167717): using "bootstrap" to make APEX libraries compatible with native bridge: 32# 33# If library is APEX-enabled: 34# 35# Then "libraryname" is not installed in the /system/lib since it's 36# supposed to be installed into APEX. 37# 38# However, "libraryname.bootstrap" goes into /system/lib/bootstrap. 39# 40# Native bridge isn't compatible with APEX yet thus "libraryname.native_bridge" 41# is not installed anywhere at all. 42# 43# However, "libraryname.bootstrap.native_bridge" gets installed into 44# /system/lib/$GUEST_ARCH/ - as we need for native bridge. 45# 46# Note: this doesn't affect native libraries at all. 47 48# Original guest libraries. 49NATIVE_BRIDGE_ORIG_GUEST_LIBS := \ 50 libandroidicu.bootstrap \ 51 libcompiler_rt \ 52 libcrypto \ 53 libcutils \ 54 libdl.bootstrap \ 55 libdl_android.bootstrap \ 56 libicu.bootstrap \ 57 liblog \ 58 libm.bootstrap \ 59 libsqlite \ 60 libssl \ 61 libstdc++ \ 62 libsync \ 63 libutils \ 64 libz 65 66NATIVE_BRIDGE_PRODUCT_PACKAGES += \ 67 libclcore.bc \ 68 libclcore_neon.bc 69 70NATIVE_BRIDGE_ORIG_GUEST_LIBS += \ 71 libRS \ 72 libRSDriver \ 73 libnative_bridge_guest_libRSSupport 74 75# These native libraries are needed to pass CtsJniTestCases, we do not use them in any way and 76# once/if build system allows us to build dummy arm libraries they can be replaced with empty ones. 77#NATIVE_BRIDGE_ORIG_GUEST_LIBS += \ 78# libart \ 79# libvorbisidec 80 81# These libraries need special support on the native bridge implementation side. 82NATIVE_BRIDGE_MODIFIED_GUEST_LIBS := \ 83 libaaudio \ 84 libamidi \ 85 libandroid \ 86 libandroid_runtime \ 87 libbinder_ndk \ 88 libc \ 89 libcamera2ndk \ 90 libEGL \ 91 libGLESv1_CM \ 92 libGLESv2 \ 93 libGLESv3 \ 94 libicui18n \ 95 libicuuc \ 96 libjnigraphics \ 97 libmediandk \ 98 libnativehelper \ 99 libnativewindow \ 100 libneuralnetworks \ 101 libOpenMAXAL \ 102 libOpenSLES \ 103 libvulkan \ 104 libwebviewchromium_plat_support 105 106# Original guest libraries are built for native_bridge 107NATIVE_BRIDGE_PRODUCT_PACKAGES += \ 108 $(addsuffix .native_bridge,$(NATIVE_BRIDGE_ORIG_GUEST_LIBS)) 109 110# Modified guest libraries are built for native_bridge and 111# have special build target prefix 112NATIVE_BRIDGE_PRODUCT_PACKAGES += \ 113 $(addprefix libnative_bridge_guest_,$(addsuffix .native_bridge,$(NATIVE_BRIDGE_MODIFIED_GUEST_LIBS))) 114 115NATIVE_BRIDGE_ORIG_GUEST_LIBS := 116