1package { 2 default_applicable_licenses: ["frameworks_base_core_jni_license"], 3} 4 5// Added automatically by a large-scale-change 6// See: http://go/android-license-faq 7license { 8 name: "frameworks_base_core_jni_license", 9 visibility: [":__subpackages__"], 10 license_kinds: [ 11 "SPDX-license-identifier-Apache-2.0", 12 ], 13 license_text: [ 14 "NOTICE", 15 ], 16} 17 18cc_library_shared { 19 name: "libandroid_runtime", 20 host_supported: true, 21 cflags: [ 22 "-Wno-unused-parameter", 23 "-Wno-non-virtual-dtor", 24 "-Wno-maybe-uninitialized", 25 "-Wno-parentheses", 26 27 "-DGL_GLEXT_PROTOTYPES", 28 "-DEGL_EGLEXT_PROTOTYPES", 29 30 "-DU_USING_ICU_NAMESPACE=0", 31 32 "-Wall", 33 "-Werror", 34 "-Wno-error=deprecated-declarations", 35 "-Wunused", 36 "-Wunreachable-code", 37 ], 38 39 cppflags: ["-Wno-conversion-null"], 40 41 srcs: [ 42 "android_animation_PropertyValuesHolder.cpp", 43 "android_os_SystemClock.cpp", 44 "android_os_SystemProperties.cpp", 45 "android_os_Trace.cpp", 46 "android_text_AndroidCharacter.cpp", 47 "android_util_EventLog.cpp", 48 "android_util_Log.cpp", 49 "android_util_StringBlock.cpp", 50 "android_util_XmlBlock.cpp", 51 "android_util_jar_StrictJarFile.cpp", 52 "com_android_internal_util_VirtualRefBasePtr.cpp", 53 ":deviceproductinfoconstants_aidl", 54 ], 55 56 include_dirs: [ 57 "external/skia/include/private", 58 "frameworks/base/media/jni", 59 "system/media/camera/include", 60 "system/media/private/camera/include", 61 ], 62 63 shared_libs: [ 64 "libbase", 65 "libcutils", 66 "libharfbuzz_ng", 67 "libhwui", 68 "liblog", 69 "libminikin", 70 "libz", 71 ], 72 73 static_libs: [ 74 "libnativehelper_lazy", 75 "libziparchive_for_incfs", 76 ], 77 78 export_include_dirs: [ 79 ".", 80 "include", 81 ], 82 83 target: { 84 android: { 85 srcs: [ 86 "AndroidRuntime.cpp", 87 "com_android_internal_content_F2fsUtils.cpp", 88 "com_android_internal_content_NativeLibraryHelper.cpp", 89 "com_google_android_gles_jni_EGLImpl.cpp", 90 "com_google_android_gles_jni_GLImpl.cpp", // TODO: .arm 91 "android_app_Activity.cpp", 92 "android_app_ActivityThread.cpp", 93 "android_app_NativeActivity.cpp", 94 "android_app_admin_SecurityLog.cpp", 95 "android_opengl_EGL14.cpp", 96 "android_opengl_EGL15.cpp", 97 "android_opengl_EGLExt.cpp", 98 "android_opengl_GLES10.cpp", 99 "android_opengl_GLES10Ext.cpp", 100 "android_opengl_GLES11.cpp", 101 "android_opengl_GLES11Ext.cpp", 102 "android_opengl_GLES20.cpp", 103 "android_opengl_GLES30.cpp", 104 "android_opengl_GLES31.cpp", 105 "android_opengl_GLES31Ext.cpp", 106 "android_opengl_GLES32.cpp", 107 "android_database_CursorWindow.cpp", 108 "android_database_SQLiteCommon.cpp", 109 "android_database_SQLiteConnection.cpp", 110 "android_database_SQLiteGlobal.cpp", 111 "android_database_SQLiteDebug.cpp", 112 "android_graphics_GraphicBuffer.cpp", 113 "android_graphics_SurfaceTexture.cpp", 114 "android_view_CompositionSamplingListener.cpp", 115 "android_view_DisplayEventReceiver.cpp", 116 "android_view_InputChannel.cpp", 117 "android_view_InputDevice.cpp", 118 "android_view_InputEventReceiver.cpp", 119 "android_view_InputEventSender.cpp", 120 "android_view_InputQueue.cpp", 121 "android_view_KeyCharacterMap.cpp", 122 "android_view_KeyEvent.cpp", 123 "android_view_MotionEvent.cpp", 124 "android_view_PointerIcon.cpp", 125 "android_view_Surface.cpp", 126 "android_view_SurfaceControl.cpp", 127 "android_view_SurfaceControlFpsListener.cpp", 128 "android_view_SurfaceControlHdrLayerInfoListener.cpp", 129 "android_graphics_BLASTBufferQueue.cpp", 130 "android_view_SurfaceSession.cpp", 131 "android_view_TextureView.cpp", 132 "android_view_TunnelModeEnabledListener.cpp", 133 "android_view_VelocityTracker.cpp", 134 "android_view_VerifiedKeyEvent.cpp", 135 "android_view_VerifiedMotionEvent.cpp", 136 "android_text_Hyphenator.cpp", 137 "android_os_Debug.cpp", 138 "android_os_GraphicsEnvironment.cpp", 139 "android_os_HidlMemory.cpp", 140 "android_os_HidlSupport.cpp", 141 "android_os_HwBinder.cpp", 142 "android_os_HwBlob.cpp", 143 "android_os_HwParcel.cpp", 144 "android_os_HwRemoteBinder.cpp", 145 "android_os_NativeHandle.cpp", 146 "android_os_MemoryFile.cpp", 147 "android_os_MessageQueue.cpp", 148 "android_os_Parcel.cpp", 149 "android_os_PerformanceHintManager.cpp", 150 "android_os_SELinux.cpp", 151 "android_os_ServiceManager.cpp", 152 "android_os_SharedMemory.cpp", 153 "android_os_storage_StorageManager.cpp", 154 "android_os_UEventObserver.cpp", 155 "android_os_VintfObject.cpp", 156 "android_os_VintfRuntimeInfo.cpp", 157 "android_os_incremental_IncrementalManager.cpp", 158 "android_net_LocalSocketImpl.cpp", 159 "android_service_DataLoaderService.cpp", 160 "android_util_AssetManager.cpp", 161 "android_util_Binder.cpp", 162 "android_util_CharsetUtils.cpp", 163 "android_util_MemoryIntArray.cpp", 164 "android_util_Process.cpp", 165 "android_media_AudioDeviceAttributes.cpp", 166 "android_media_AudioEffectDescriptor.cpp", 167 "android_media_AudioRecord.cpp", 168 "android_media_AudioSystem.cpp", 169 "android_media_AudioTrackCallback.cpp", 170 "android_media_AudioTrack.cpp", 171 "android_media_AudioAttributes.cpp", 172 "android_media_AudioProductStrategies.cpp", 173 "android_media_AudioVolumeGroups.cpp", 174 "android_media_AudioVolumeGroupCallback.cpp", 175 "android_media_DeviceCallback.cpp", 176 "android_media_MediaMetricsJNI.cpp", 177 "android_media_MicrophoneInfo.cpp", 178 "android_media_midi.cpp", 179 "android_media_RemoteDisplay.cpp", 180 "android_media_ToneGenerator.cpp", 181 "android_hardware_Camera.cpp", 182 "android_hardware_camera2_CameraMetadata.cpp", 183 "android_hardware_camera2_DngCreator.cpp", 184 "android_hardware_camera2_impl_CameraExtensionJpegProcessor.cpp", 185 "android_hardware_camera2_utils_SurfaceUtils.cpp", 186 "android_hardware_display_DisplayManagerGlobal.cpp", 187 "android_hardware_display_DisplayViewport.cpp", 188 "android_hardware_HardwareBuffer.cpp", 189 "android_hardware_SensorManager.cpp", 190 "android_hardware_SerialPort.cpp", 191 "android_hardware_UsbDevice.cpp", 192 "android_hardware_UsbDeviceConnection.cpp", 193 "android_hardware_UsbRequest.cpp", 194 "android_hardware_location_ActivityRecognitionHardware.cpp", 195 "android_util_FileObserver.cpp", 196 "android/opengl/poly_clip.cpp", // TODO: .arm 197 "android/opengl/util.cpp", 198 "android_server_NetworkManagementSocketTagger.cpp", 199 "android_ddm_DdmHandleNativeHeap.cpp", 200 "android_backup_BackupDataInput.cpp", 201 "android_backup_BackupDataOutput.cpp", 202 "android_backup_FileBackupHelperBase.cpp", 203 "android_backup_BackupHelperDispatcher.cpp", 204 "android_app_backup_FullBackup.cpp", 205 "android_content_res_ApkAssets.cpp", 206 "android_content_res_ObbScanner.cpp", 207 "android_content_res_Configuration.cpp", 208 "android_security_Scrypt.cpp", 209 "com_android_internal_content_om_OverlayConfig.cpp", 210 "com_android_internal_net_NetworkUtilsInternal.cpp", 211 "com_android_internal_os_ClassLoaderFactory.cpp", 212 "com_android_internal_os_DmabufInfoReader.cpp", 213 "com_android_internal_os_FuseAppLoop.cpp", 214 "com_android_internal_os_KernelCpuBpfTracking.cpp", 215 "com_android_internal_os_KernelCpuTotalBpfMapReader.cpp", 216 "com_android_internal_os_KernelCpuUidBpfMapReader.cpp", 217 "com_android_internal_os_KernelSingleProcessCpuThreadReader.cpp", 218 "com_android_internal_os_KernelSingleUidTimeReader.cpp", 219 "com_android_internal_os_Zygote.cpp", 220 "com_android_internal_os_ZygoteCommandBuffer.cpp", 221 "com_android_internal_os_ZygoteInit.cpp", 222 "com_android_internal_security_VerityUtils.cpp", 223 "hwbinder/EphemeralStorage.cpp", 224 "fd_utils.cpp", 225 "android_hardware_input_InputWindowHandle.cpp", 226 "android_hardware_input_InputApplicationHandle.cpp", 227 ], 228 229 static_libs: [ 230 "libasync_safe", 231 "libbinderthreadstateutils", 232 "libdmabufinfo", 233 "libgif", 234 "libseccomp_policy", 235 "libgrallocusage", 236 "libscrypt_static", 237 "libstatssocket_lazy", 238 ], 239 240 shared_libs: [ 241 "audioclient-types-aidl-cpp", 242 "audioflinger-aidl-cpp", 243 "av-types-aidl-cpp", 244 "android.hardware.camera.device@3.2", 245 "libandroidicu", 246 "libbpf_android", 247 "libnetdbpf", 248 "libnetdutils", 249 "libmemtrack", 250 "libandroidfw", 251 "libappfuse", 252 "libcrypto", 253 "libcutils", 254 "libdebuggerd_client", 255 "libutils", 256 "libbinder", 257 "libui", 258 "libgraphicsenv", 259 "libgui", 260 "libmediandk", 261 "libpermission", 262 "libsensor", 263 "libinput", 264 "libcamera_client", 265 "libcamera_metadata", 266 "libsqlite", 267 "libEGL", 268 "libGLESv1_CM", 269 "libGLESv2", 270 "libGLESv3", 271 "libincfs", 272 "libdataloader", 273 "libvulkan", 274 "libETC1", 275 "libjpeg", 276 "libhardware", 277 "libhardware_legacy", 278 "libselinux", 279 "libmedia", 280 "libmedia_helper", 281 "libmediametrics", 282 "libmeminfo", 283 "libaudioclient", 284 "libaudiofoundation", 285 "libaudiopolicy", 286 "libusbhost", 287 "libpdfium", 288 "libimg_utils", 289 "libnetd_client", 290 "libprocessgroup", 291 "libnativebridge_lazy", 292 "libnativeloader_lazy", 293 "libmemunreachable", 294 "libhidlbase", 295 "libvintf", 296 "libnativedisplay", 297 "libnativewindow", 298 "libdl", 299 "libdl_android", 300 "libtimeinstate", 301 "server_configurable_flags", 302 ], 303 export_shared_lib_headers: [ 304 // our headers include libnativewindow's public headers 305 "libnativewindow", 306 ], 307 export_static_lib_headers: [ 308 // AndroidRuntime.h depends on nativehelper/jni.h 309 "libnativehelper_lazy", 310 ], 311 header_libs: [ 312 "bionic_libc_platform_headers", 313 "dnsproxyd_protocol_headers", 314 ], 315 }, 316 host: { 317 cflags: [ 318 "-Wno-unused-const-variable", 319 "-Wno-unused-function", 320 ], 321 srcs: [ 322 "LayoutlibLoader.cpp", 323 ], 324 include_dirs: [ 325 "external/vulkan-headers/include", 326 "frameworks/native/libs/math/include", 327 "frameworks/native/libs/nativebase/include", 328 "frameworks/native/libs/nativewindow/include", 329 ], 330 shared_libs: [ 331 "libicui18n", 332 "libicuuc", 333 ], 334 static_libs: [ 335 "libandroidfw", 336 "libcompiler_rt", 337 "libutils", 338 "libhostgraphics", 339 ], 340 }, 341 linux_glibc: { 342 srcs: [ 343 "android_content_res_ApkAssets.cpp", 344 "android_database_CursorWindow.cpp", 345 "android_database_SQLiteCommon.cpp", 346 "android_database_SQLiteConnection.cpp", 347 "android_database_SQLiteGlobal.cpp", 348 "android_database_SQLiteDebug.cpp", 349 "android_hardware_input_InputApplicationHandle.cpp", 350 "android_os_MessageQueue.cpp", 351 "android_os_Parcel.cpp", 352 353 "android_view_KeyCharacterMap.cpp", 354 "android_view_KeyEvent.cpp", 355 "android_view_InputChannel.cpp", 356 "android_view_InputDevice.cpp", 357 "android_view_InputEventReceiver.cpp", 358 "android_view_InputEventSender.cpp", 359 "android_view_MotionEvent.cpp", 360 "android_view_VelocityTracker.cpp", 361 "android_view_VerifiedKeyEvent.cpp", 362 "android_view_VerifiedMotionEvent.cpp", 363 364 "android_util_AssetManager.cpp", 365 "android_util_Binder.cpp", 366 367 "android_util_FileObserver.cpp", 368 ], 369 static_libs: [ 370 "libinput", 371 "libbinderthreadstateutils", 372 "libsqlite", 373 ], 374 shared_libs: [ 375 // libbinder needs to be shared since it has global state 376 // (e.g. gDefaultServiceManager) 377 "libbinder", 378 "libhidlbase", // libhwbinder is in here 379 ], 380 }, 381 }, 382 383 // Workaround Clang LTO crash. 384 lto: { 385 never: true, 386 }, 387} 388