1# Logging library 2cc_library( 3 name = "logging", 4 srcs = [ 5 "GfxstreamFatalError.cpp", 6 "logging.cpp", 7 ], 8 hdrs = ["include/host-common/logging.h"], 9 defines = [ 10 "BUILDING_EMUGL_COMMON_SHARED", 11 ] + select({ 12 "@platforms//os:windows": [ 13 "WIN32_LEAN_AND_MEAN", 14 ], 15 "//conditions:default": [], 16 }), 17 includes = ["include/host-common"], 18 visibility = ["//visibility:public"], 19 deps = [ 20 ":aemu-host-common-headers", 21 "//hardware/google/aemu/base:aemu-base-headers", 22 "//hardware/google/aemu/base:aemu-base-metrics", 23 ], 24) 25 26cc_library( 27 name = "aemu-host-common-headers", 28 hdrs = glob([ 29 "include/**/*.h", 30 "include/**/*.hpp", 31 ]), 32 includes = ["include"], 33 visibility = ["//visibility:public"], 34) 35 36# Standalone Library (conditional) 37cc_library( 38 name = "aemu-host-common", 39 srcs = [ 40 "AndroidPipe.cpp", 41 "DmaMap.cpp", 42 "GoldfishDma.cpp", 43 "GoldfishSyncCommandQueue.cpp", 44 "GraphicsAgentFactory.cpp", 45 "HostmemIdMapping.cpp", 46 "RefcountPipe.cpp", 47 "address_space_device.cpp", 48 "address_space_device_control_ops.cpp", 49 "address_space_graphics.cpp", 50 "address_space_host_media.cpp", 51 "address_space_host_memory_allocator.cpp", 52 "address_space_shared_slots_host_memory_allocator.cpp", 53 "crash_reporter.cpp", 54 "dma_device.cpp", 55 "empty-crash-handler.cpp", 56 "feature_control.cpp", 57 "goldfish_sync.cpp", 58 "hw-config.cpp", 59 "misc.cpp", 60 "sync_device.cpp", 61 "vm_operations.cpp", 62 "window_operations.cpp", 63 ], 64 hdrs = [":aemu-host-common-headers"], 65 copts = [ 66 "-Wno-return-type-c-linkage", 67 "-Wno-extern-c-compat", 68 ], 69 defines = [ 70 "BUILDING_EMUGL_COMMON_SHARED", 71 ] + select({ 72 "@platforms//os:windows": [ 73 "WIN32_LEAN_AND_MEAN", 74 ], 75 "//conditions:default": [], 76 }), 77 visibility = ["//visibility:public"], 78 deps = [ 79 ":aemu-host-common-headers", 80 ":logging", 81 "//hardware/google/aemu/base:aemu-base-allocator", 82 "//hardware/google/aemu/base:aemu-base-headers", 83 ], 84 alwayslink = 1, 85) 86 87# Override Library 88cc_library( 89 name = "aemu-host-common-product-feature-override", 90 srcs = ["FeatureControlOverride.cpp"], 91 hdrs = glob(["include/**/*.h"]), 92 defines = [ 93 "BUILDING_EMUGL_COMMON_SHARED", 94 ] + select({ 95 "@platforms//os:windows": [ 96 "WIN32_LEAN_AND_MEAN", 97 ], 98 "//conditions:default": [], 99 }), 100 includes = ["include"], 101 visibility = ["//visibility:public"], 102 deps = [ 103 ":aemu-host-common-headers", 104 "//hardware/google/aemu/base:aemu-base-headers", 105 ], 106) 107 108# Testing Libraries and Executable (conditional) 109cc_test( 110 name = "aemu-host-common_unittests", 111 srcs = glob([ 112 "*_unitests.cpp", 113 "testing/**", 114 ]), 115 includes = ["testing"], 116 deps = [ 117 ":aemu-host-common-headers", 118 ":logging", 119 "//hardware/google/aemu/base:aemu-base-headers", 120 "@com_google_googletest//:gtest_main", 121 ], 122) 123