| 1 |
package { |
| 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 |
| 7 |
license { |
| 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 |
|
| 18 |
cc_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 |
"-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash", |
| 39 |
], |
| 40 |
|
| 41 |
cppflags: ["-Wno-conversion-null"], |
| 42 |
|
| 43 |
product_variables: { |
| 44 |
eng: { |
| 45 |
cflags: ["-DNO_RESET_STACK_PROTECTOR"], |
| 46 |
}, |
| 47 |
}, |
| 48 |
|
| 49 |
cpp_std: "gnu++20", |
| 50 |
|
| 51 |
srcs: [ |
| 52 |
"android_animation_PropertyValuesHolder.cpp", |
| 53 |
"android_os_SystemClock.cpp", |
| 54 |
"android_os_SystemProperties.cpp", |
| 55 |
"android_os_Trace.cpp", |
| 56 |
"android_text_AndroidCharacter.cpp", |
| 57 |
"android_util_EventLog.cpp", |
| 58 |
"android_util_Log.cpp", |
| 59 |
"android_util_StringBlock.cpp", |
| 60 |
"android_util_XmlBlock.cpp", |
| 61 |
"android_util_jar_StrictJarFile.cpp", |
| 62 |
"com_android_internal_util_VirtualRefBasePtr.cpp", |
| 63 |
"core_jni_helpers.cpp", |
| 64 |
":deviceproductinfoconstants_aidl", |
| 65 |
], |
| 66 |
|
| 67 |
include_dirs: [ |
| 68 |
"external/skia/include/private", |
| 69 |
"frameworks/base/media/jni", |
| 70 |
"system/media/camera/include", |
| 71 |
"system/media/private/camera/include", |
| 72 |
], |
| 73 |
|
| 74 |
shared_libs: [ |
| 75 |
"libbase", |
| 76 |
"libcutils", |
| 77 |
"libharfbuzz_ng", |
| 78 |
"liblog", |
| 79 |
"libminikin", |
| 80 |
"libz", |
| 81 |
], |
| 82 |
|
| 83 |
static_libs: [ |
| 84 |
"libnativehelper_lazy", |
| 85 |
"libziparchive_for_incfs", |
| 86 |
], |
| 87 |
|
| 88 |
export_include_dirs: [ |
| 89 |
".", |
| 90 |
"include", |
| 91 |
], |
| 92 |
|
| 93 |
defaults: [ |
| 94 |
"latest_android_media_audio_common_types_cpp_target_shared", |
| 95 |
], |
| 96 |
|
| 97 |
target: { |
| 98 |
android: { |
| 99 |
srcs: [ |
| 100 |
"AndroidRuntime.cpp", |
| 101 |
"com_android_internal_content_F2fsUtils.cpp", |
| 102 |
"com_android_internal_content_NativeLibraryHelper.cpp", |
| 103 |
"com_google_android_gles_jni_EGLImpl.cpp", |
| 104 |
"com_google_android_gles_jni_GLImpl.cpp", // TODO: .arm |
| 105 |
"android_app_Activity.cpp", |
| 106 |
"android_app_ActivityThread.cpp", |
| 107 |
"android_app_NativeActivity.cpp", |
| 108 |
"android_app_admin_SecurityLog.cpp", |
| 109 |
"android_opengl_EGL14.cpp", |
| 110 |
"android_opengl_EGL15.cpp", |
| 111 |
"android_opengl_EGLExt.cpp", |
| 112 |
"android_opengl_GLES10.cpp", |
| 113 |
"android_opengl_GLES10Ext.cpp", |
| 114 |
"android_opengl_GLES11.cpp", |
| 115 |
"android_opengl_GLES11Ext.cpp", |
| 116 |
"android_opengl_GLES20.cpp", |
| 117 |
"android_opengl_GLES30.cpp", |
| 118 |
"android_opengl_GLES31.cpp", |
| 119 |
"android_opengl_GLES31Ext.cpp", |
| 120 |
"android_opengl_GLES32.cpp", |
| 121 |
"android_database_CursorWindow.cpp", |
| 122 |
"android_database_SQLiteCommon.cpp", |
| 123 |
"android_database_SQLiteConnection.cpp", |
| 124 |
"android_database_SQLiteGlobal.cpp", |
| 125 |
"android_database_SQLiteDebug.cpp", |
| 126 |
"android_graphics_GraphicBuffer.cpp", |
| 127 |
"android_graphics_SurfaceTexture.cpp", |
| 128 |
"android_view_CompositionSamplingListener.cpp", |
| 129 |
"android_view_DisplayEventReceiver.cpp", |
| 130 |
"android_view_InputChannel.cpp", |
| 131 |
"android_view_InputDevice.cpp", |
| 132 |
"android_view_InputEventReceiver.cpp", |
| 133 |
"android_view_InputEventSender.cpp", |
| 134 |
"android_view_InputQueue.cpp", |
| 135 |
"android_view_KeyCharacterMap.cpp", |
| 136 |
"android_view_KeyEvent.cpp", |
| 137 |
"android_view_MotionEvent.cpp", |
| 138 |
"android_view_PointerIcon.cpp", |
| 139 |
"android_view_Surface.cpp", |
| 140 |
"android_view_SurfaceControl.cpp", |
| 141 |
"android_view_SurfaceControlHdrLayerInfoListener.cpp", |
| 142 |
"android_graphics_BLASTBufferQueue.cpp", |
| 143 |
"android_view_SurfaceSession.cpp", |
| 144 |
"android_view_TextureView.cpp", |
| 145 |
"android_view_TunnelModeEnabledListener.cpp", |
| 146 |
"android_view_VelocityTracker.cpp", |
| 147 |
"android_view_VerifiedKeyEvent.cpp", |
| 148 |
"android_view_VerifiedMotionEvent.cpp", |
| 149 |
"android_text_Hyphenator.cpp", |
| 150 |
"android_os_Debug.cpp", |
| 151 |
"android_os_GraphicsEnvironment.cpp", |
| 152 |
"android_os_HidlMemory.cpp", |
| 153 |
"android_os_HidlSupport.cpp", |
| 154 |
"android_os_HwBinder.cpp", |
| 155 |
"android_os_HwBlob.cpp", |
| 156 |
"android_os_HwParcel.cpp", |
| 157 |
"android_os_HwRemoteBinder.cpp", |
| 158 |
"android_os_NativeHandle.cpp", |
| 159 |
"android_os_MemoryFile.cpp", |
| 160 |
"android_os_MessageQueue.cpp", |
| 161 |
"android_os_Parcel.cpp", |
| 162 |
"android_os_PerformanceHintManager.cpp", |
| 163 |
"android_os_SELinux.cpp", |
| 164 |
"android_os_ServiceManager.cpp", |
| 165 |
"android_os_SharedMemory.cpp", |
| 166 |
"android_os_storage_StorageManager.cpp", |
| 167 |
"android_os_UEventObserver.cpp", |
| 168 |
"android_os_VintfObject.cpp", |
| 169 |
"android_os_VintfRuntimeInfo.cpp", |
| 170 |
"android_os_incremental_IncrementalManager.cpp", |
| 171 |
"android_net_LocalSocketImpl.cpp", |
| 172 |
"android_service_DataLoaderService.cpp", |
| 173 |
"android_util_AssetManager.cpp", |
| 174 |
"android_util_Binder.cpp", |
| 175 |
"android_util_CharsetUtils.cpp", |
| 176 |
"android_util_MemoryIntArray.cpp", |
| 177 |
"android_util_Process.cpp", |
| 178 |
"android_media_audio_common_AidlConversion.cpp", |
| 179 |
"android_media_AudioDeviceAttributes.cpp", |
| 180 |
"android_media_AudioEffectDescriptor.cpp", |
| 181 |
"android_media_AudioRecord.cpp", |
| 182 |
"android_media_AudioSystem.cpp", |
| 183 |
"android_media_AudioTrackCallback.cpp", |
| 184 |
"android_media_AudioTrack.cpp", |
| 185 |
"android_media_AudioAttributes.cpp", |
| 186 |
"android_media_AudioProductStrategies.cpp", |
| 187 |
"android_media_AudioVolumeGroups.cpp", |
| 188 |
"android_media_AudioVolumeGroupCallback.cpp", |
| 189 |
"android_media_DeviceCallback.cpp", |
| 190 |
"android_media_MediaMetricsJNI.cpp", |
| 191 |
"android_media_MicrophoneInfo.cpp", |
| 192 |
"android_media_midi.cpp", |
| 193 |
"android_media_RemoteDisplay.cpp", |
| 194 |
"android_media_ToneGenerator.cpp", |
| 195 |
"android_hardware_Camera.cpp", |
| 196 |
"android_hardware_camera2_CameraMetadata.cpp", |
| 197 |
"android_hardware_camera2_DngCreator.cpp", |
| 198 |
"android_hardware_camera2_impl_CameraExtensionJpegProcessor.cpp", |
| 199 |
"android_hardware_camera2_utils_SurfaceUtils.cpp", |
| 200 |
"android_hardware_display_DisplayManagerGlobal.cpp", |
| 201 |
"android_hardware_display_DisplayViewport.cpp", |
| 202 |
"android_hardware_HardwareBuffer.cpp", |
| 203 |
"android_hardware_SensorManager.cpp", |
| 204 |
"android_hardware_SerialPort.cpp", |
| 205 |
"android_hardware_SyncFence.cpp", |
| 206 |
"android_hardware_UsbDevice.cpp", |
| 207 |
"android_hardware_UsbDeviceConnection.cpp", |
| 208 |
"android_hardware_UsbRequest.cpp", |
| 209 |
"android_hardware_location_ActivityRecognitionHardware.cpp", |
| 210 |
"android_util_FileObserver.cpp", |
| 211 |
"android/opengl/poly_clip.cpp", // TODO: .arm |
| 212 |
"android/opengl/util.cpp", |
| 213 |
"android_ddm_DdmHandleNativeHeap.cpp", |
| 214 |
"android_backup_BackupDataInput.cpp", |
| 215 |
"android_backup_BackupDataOutput.cpp", |
| 216 |
"android_backup_FileBackupHelperBase.cpp", |
| 217 |
"android_backup_BackupHelperDispatcher.cpp", |
| 218 |
"android_app_backup_FullBackup.cpp", |
| 219 |
"android_content_res_ApkAssets.cpp", |
| 220 |
"android_content_res_ObbScanner.cpp", |
| 221 |
"android_content_res_Configuration.cpp", |
| 222 |
"android_security_Scrypt.cpp", |
| 223 |
"com_android_internal_content_om_OverlayConfig.cpp", |
| 224 |
"com_android_internal_expresslog_Utils.cpp", |
| 225 |
"com_android_internal_net_NetworkUtilsInternal.cpp", |
| 226 |
"com_android_internal_os_ClassLoaderFactory.cpp", |
| 227 |
"com_android_internal_os_FuseAppLoop.cpp", |
| 228 |
"com_android_internal_os_KernelAllocationStats.cpp", |
| 229 |
"com_android_internal_os_KernelCpuBpfTracking.cpp", |
| 230 |
"com_android_internal_os_KernelCpuTotalBpfMapReader.cpp", |
| 231 |
"com_android_internal_os_KernelCpuUidBpfMapReader.cpp", |
| 232 |
"com_android_internal_os_KernelSingleProcessCpuThreadReader.cpp", |
| 233 |
"com_android_internal_os_KernelSingleUidTimeReader.cpp", |
| 234 |
"com_android_internal_os_LongArrayMultiStateCounter.cpp", |
| 235 |
"com_android_internal_os_LongMultiStateCounter.cpp", |
| 236 |
"com_android_internal_os_Zygote.cpp", |
| 237 |
"com_android_internal_os_ZygoteCommandBuffer.cpp", |
| 238 |
"com_android_internal_os_ZygoteInit.cpp", |
| 239 |
"com_android_internal_security_VerityUtils.cpp", |
| 240 |
"hwbinder/EphemeralStorage.cpp", |
| 241 |
"fd_utils.cpp", |
| 242 |
"android_hardware_input_InputWindowHandle.cpp", |
| 243 |
"android_hardware_input_InputApplicationHandle.cpp", |
| 244 |
"android_window_WindowInfosListener.cpp", |
| 245 |
], |
| 246 |
|
| 247 |
static_libs: [ |
| 248 |
"libasync_safe", |
| 249 |
"libbinderthreadstateutils", |
| 250 |
"libdmabufinfo", |
| 251 |
"libgif", |
| 252 |
"libgui_window_info_static", |
| 253 |
"libseccomp_policy", |
| 254 |
"libgrallocusage", |
| 255 |
"libscrypt_static", |
| 256 |
"libstatssocket_lazy", |
| 257 |
"libskia", |
| 258 |
"libtextclassifier_hash_static", |
| 259 |
], |
| 260 |
|
| 261 |
shared_libs: [ |
| 262 |
"audioclient-types-aidl-cpp", |
| 263 |
"audioflinger-aidl-cpp", |
| 264 |
"audiopolicy-types-aidl-cpp", |
| 265 |
"spatializer-aidl-cpp", |
| 266 |
"av-types-aidl-cpp", |
| 267 |
"[email protected]", |
| 268 |
"libandroid_net", |
| 269 |
"libbattery", |
| 270 |
"libnetdutils", |
| 271 |
"libmemtrack", |
| 272 |
"libandroidfw", |
| 273 |
"libappfuse", |
| 274 |
"libcrypto", |
| 275 |
"libcutils", |
| 276 |
"libdebuggerd_client", |
| 277 |
"libutils", |
| 278 |
"libbinder", |
| 279 |
"libbinder_ndk", |
| 280 |
"libui", |
| 281 |
"libgraphicsenv", |
| 282 |
"libgui", |
| 283 |
"libhwui", |
| 284 |
"libmediandk", |
| 285 |
"libpermission", |
| 286 |
"libsensor", |
| 287 |
"libinput", |
| 288 |
"libicu", |
| 289 |
"libcamera_client", |
| 290 |
"libcamera_metadata", |
| 291 |
"libprocinfo", |
| 292 |
"libsqlite", |
| 293 |
"libEGL", |
| 294 |
"libGLESv1_CM", |
| 295 |
"libGLESv2", |
| 296 |
"libGLESv3", |
| 297 |
"libincfs", |
| 298 |
"libdataloader", |
| 299 |
"libvulkan", |
| 300 |
"libETC1", |
| 301 |
"libjpeg", |
| 302 |
"libhardware", |
| 303 |
"libhardware_legacy", |
| 304 |
"libselinux", |
| 305 |
"libmedia", |
| 306 |
"libmedia_helper", |
| 307 |
"libmediametrics", |
| 308 |
"libmeminfo", |
| 309 |
"libaudioclient", |
| 310 |
"libaudioclient_aidl_conversion", |
| 311 |
"libaudiofoundation", |
| 312 |
"libaudiopolicy", |
| 313 |
"libusbhost", |
| 314 |
"libpdfium", |
| 315 |
"libimg_utils", |
| 316 |
"libnetd_client", |
| 317 |
"libprocessgroup", |
| 318 |
"libnativebridge_lazy", |
| 319 |
"libnativeloader_lazy", |
| 320 |
"libmemunreachable", |
| 321 |
"libhidlbase", |
| 322 |
"libvintf", |
| 323 |
"libnativedisplay", |
| 324 |
"libnativewindow", |
| 325 |
"libdl", |
| 326 |
"libdl_android", |
| 327 |
"libtimeinstate", |
| 328 |
"server_configurable_flags", |
| 329 |
], |
| 330 |
export_shared_lib_headers: [ |
| 331 |
// our headers include libnativewindow's public headers |
| 332 |
"libnativewindow", |
| 333 |
], |
| 334 |
export_static_lib_headers: [ |
| 335 |
// AndroidRuntime.h depends on nativehelper/jni.h |
| 336 |
"libnativehelper_lazy", |
| 337 |
], |
| 338 |
header_libs: [ |
| 339 |
"bionic_libc_platform_headers", |
| 340 |
"dnsproxyd_protocol_headers", |
| 341 |
"libtextclassifier_hash_headers", |
| 342 |
], |
| 343 |
}, |
| 344 |
host: { |
| 345 |
cflags: [ |
| 346 |
"-Wno-unused-const-variable", |
| 347 |
"-Wno-unused-function", |
| 348 |
], |
| 349 |
srcs: [ |
| 350 |
"LayoutlibLoader.cpp", |
| 351 |
], |
| 352 |
include_dirs: [ |
| 353 |
"external/vulkan-headers/include", |
| 354 |
"frameworks/native/libs/math/include", |
| 355 |
"frameworks/native/libs/nativebase/include", |
| 356 |
"frameworks/native/libs/nativewindow/include", |
| 357 |
], |
| 358 |
shared_libs: [ |
| 359 |
"libicui18n", |
| 360 |
"libicuuc", |
| 361 |
], |
| 362 |
static_libs: [ |
| 363 |
"libandroidfw", |
| 364 |
"libbinary_parse", |
| 365 |
"libdng_sdk", |
| 366 |
"libft2", |
| 367 |
"libhostgraphics", |
| 368 |
"libhwui", |
| 369 |
"libimage_type_recognition", |
| 370 |
"libjpeg", |
| 371 |
"libpiex", |
| 372 |
"libpng", |
| 373 |
"libtiff_directory", |
| 374 |
"libui-types", |
| 375 |
"libutils", |
| 376 |
"libwebp-decode", |
| 377 |
"libwebp-encode", |
| 378 |
"libwuffs_mirror_release_c", |
| 379 |
], |
| 380 |
}, |
| 381 |
host_linux: { |
| 382 |
srcs: [ |
| 383 |
"android_content_res_ApkAssets.cpp", |
| 384 |
"android_database_CursorWindow.cpp", |
| 385 |
"android_database_SQLiteCommon.cpp", |
| 386 |
"android_database_SQLiteConnection.cpp", |
| 387 |
"android_database_SQLiteGlobal.cpp", |
| 388 |
"android_database_SQLiteDebug.cpp", |
| 389 |
"android_hardware_input_InputApplicationHandle.cpp", |
| 390 |
"android_os_MessageQueue.cpp", |
| 391 |
"android_os_Parcel.cpp", |
| 392 |
|
| 393 |
"android_view_KeyCharacterMap.cpp", |
| 394 |
"android_view_KeyEvent.cpp", |
| 395 |
"android_view_InputChannel.cpp", |
| 396 |
"android_view_InputDevice.cpp", |
| 397 |
"android_view_InputEventReceiver.cpp", |
| 398 |
"android_view_InputEventSender.cpp", |
| 399 |
"android_view_MotionEvent.cpp", |
| 400 |
"android_view_VelocityTracker.cpp", |
| 401 |
"android_view_VerifiedKeyEvent.cpp", |
| 402 |
"android_view_VerifiedMotionEvent.cpp", |
| 403 |
|
| 404 |
"android_util_AssetManager.cpp", |
| 405 |
"android_util_Binder.cpp", |
| 406 |
|
| 407 |
"android_util_FileObserver.cpp", |
| 408 |
], |
| 409 |
static_libs: [ |
| 410 |
"libinput", |
| 411 |
"libbinderthreadstateutils", |
| 412 |
"libsqlite", |
| 413 |
"libgui_window_info_static", |
| 414 |
], |
| 415 |
shared_libs: [ |
| 416 |
// libbinder needs to be shared since it has global state |
| 417 |
// (e.g. gDefaultServiceManager) |
| 418 |
"libbinder", |
| 419 |
"libhidlbase", // libhwbinder is in here |
| 420 |
"libvintf", |
| 421 |
], |
| 422 |
}, |
| 423 |
}, |
| 424 |
|
| 425 |
// Workaround Clang LTO crash. |
| 426 |
lto: { |
| 427 |
never: true, |
| 428 |
}, |
| 429 |
} |