Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "surfaceflinger_defaults", |
| 3 | cflags: [ |
| 4 | "-DLOG_TAG=\"SurfaceFlinger\"", |
| 5 | "-Wall", |
| 6 | "-Werror", |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 7 | "-Wformat", |
Lloyd Pique | 755e319 | 2018-01-31 16:46:15 -0800 | [diff] [blame] | 8 | "-Wthread-safety", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 9 | "-Wunused", |
| 10 | "-Wunreachable-code", |
| 11 | ], |
| 12 | cppflags: ["-std=c++1z"], |
| 13 | } |
| 14 | |
| 15 | cc_defaults { |
| 16 | name: "libsurfaceflinger_defaults", |
| 17 | defaults: ["surfaceflinger_defaults"], |
| 18 | cflags: [ |
| 19 | "-DGL_GLEXT_PROTOTYPES", |
| 20 | "-DEGL_EGLEXT_PROTOTYPES", |
| 21 | ], |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 22 | include_dirs: [ |
| 23 | "frameworks/native/vulkan/vkjson", |
| 24 | "frameworks/native/vulkan/include", |
| 25 | ], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 26 | shared_libs: [ |
| 27 | "android.frameworks.vr.composer@1.0", |
| 28 | "android.hardware.configstore-utils", |
| 29 | "android.hardware.configstore@1.0", |
Iris Chang | 7501ed6 | 2018-04-30 14:45:42 +0800 | [diff] [blame] | 30 | "android.hardware.configstore@1.1", |
Peiyong Lin | 13effd1 | 2018-07-24 17:01:47 -0700 | [diff] [blame] | 31 | "android.hardware.configstore@1.2", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 32 | "android.hardware.graphics.allocator@2.0", |
Valerie Hau | 9758ae0 | 2018-10-09 16:05:09 -0700 | [diff] [blame] | 33 | "android.hardware.graphics.common@1.2", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 34 | "android.hardware.graphics.composer@2.1", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 35 | "android.hardware.graphics.composer@2.2", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 36 | "android.hardware.graphics.composer@2.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 37 | "android.hardware.power@1.0", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 38 | "android.hardware.power@1.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 39 | "libbase", |
| 40 | "libbinder", |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 41 | "libbufferhubqueue", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 42 | "libcutils", |
| 43 | "libdl", |
| 44 | "libEGL", |
| 45 | "libfmq", |
| 46 | "libGLESv1_CM", |
| 47 | "libGLESv2", |
| 48 | "libgui", |
| 49 | "libhardware", |
| 50 | "libhidlbase", |
| 51 | "libhidltransport", |
| 52 | "libhwbinder", |
| 53 | "liblayers_proto", |
| 54 | "liblog", |
Alec Mouri | 05483a0 | 2018-09-10 21:03:42 +0000 | [diff] [blame] | 55 | "libnativewindow", |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 56 | "libpdx_default_transport", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 57 | "libprotobuf-cpp-lite", |
| 58 | "libsync", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 59 | "libtimestats_proto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 60 | "libui", |
| 61 | "libutils", |
| 62 | "libvulkan", |
| 63 | ], |
| 64 | static_libs: [ |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 65 | "librenderengine", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 66 | "libserviceutils", |
| 67 | "libtrace_proto", |
| 68 | "libvkjson", |
| 69 | "libvr_manager", |
| 70 | "libvrflinger", |
| 71 | ], |
| 72 | header_libs: [ |
| 73 | "android.hardware.graphics.composer@2.1-command-buffer", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 74 | "android.hardware.graphics.composer@2.2-command-buffer", |
Peiyong Lin | 698147a | 2018-09-14 13:27:18 -0700 | [diff] [blame] | 75 | "android.hardware.graphics.composer@2.3-command-buffer", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 76 | ], |
| 77 | export_static_lib_headers: [ |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 78 | "librenderengine", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 79 | "libserviceutils", |
| 80 | ], |
| 81 | export_shared_lib_headers: [ |
| 82 | "android.hardware.graphics.allocator@2.0", |
Valerie Hau | 9758ae0 | 2018-10-09 16:05:09 -0700 | [diff] [blame] | 83 | "android.hardware.graphics.common@1.2", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 84 | "android.hardware.graphics.composer@2.1", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 85 | "android.hardware.graphics.composer@2.2", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 86 | "android.hardware.graphics.composer@2.3", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 87 | "android.hardware.power@1.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 88 | "libhidlbase", |
| 89 | "libhidltransport", |
| 90 | "libhwbinder", |
| 91 | ], |
| 92 | } |
| 93 | |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 94 | cc_defaults { |
| 95 | name: "libsurfaceflinger_production_defaults", |
| 96 | defaults: ["libsurfaceflinger_defaults"], |
| 97 | cflags: [ |
| 98 | "-fvisibility=hidden", |
| 99 | "-fwhole-program-vtables", // requires ThinLTO |
| 100 | ], |
| 101 | lto: { |
| 102 | thin: true, |
| 103 | }, |
| 104 | } |
| 105 | |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 106 | cc_library_headers { |
| 107 | name: "libsurfaceflinger_headers", |
Alex Vakulenko | 06a7634 | 2017-02-01 22:25:44 -0800 | [diff] [blame] | 108 | export_include_dirs: ["."], |
Logan Chien | 3ac6c96 | 2018-02-27 16:46:00 +0800 | [diff] [blame] | 109 | static_libs: ["libserviceutils"], |
| 110 | export_static_lib_headers: ["libserviceutils"], |
Alex Vakulenko | 06a7634 | 2017-02-01 22:25:44 -0800 | [diff] [blame] | 111 | } |
Kalle Raita | a099a24 | 2017-01-11 11:17:29 -0800 | [diff] [blame] | 112 | |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 113 | filegroup { |
| 114 | name: "libsurfaceflinger_sources", |
| 115 | srcs: [ |
| 116 | "BufferLayer.cpp", |
| 117 | "BufferLayerConsumer.cpp", |
Marissa Wall | fd66862 | 2018-05-10 10:21:13 -0700 | [diff] [blame] | 118 | "BufferQueueLayer.cpp", |
Marissa Wall | 61c5862 | 2018-07-18 10:12:20 -0700 | [diff] [blame] | 119 | "BufferStateLayer.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 120 | "Client.cpp", |
| 121 | "ColorLayer.cpp", |
Robert Carr | cdf8320 | 2018-03-07 12:48:34 -0800 | [diff] [blame] | 122 | "ContainerLayer.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 123 | "DisplayDevice.cpp", |
| 124 | "DisplayHardware/ComposerHal.cpp", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 125 | "DisplayHardware/DisplayIdentification.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 126 | "DisplayHardware/FramebufferSurface.cpp", |
| 127 | "DisplayHardware/HWC2.cpp", |
| 128 | "DisplayHardware/HWComposer.cpp", |
| 129 | "DisplayHardware/HWComposerBufferCache.cpp", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 130 | "DisplayHardware/PowerAdvisor.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 131 | "DisplayHardware/VirtualDisplaySurface.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 132 | "Effects/Daltonizer.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 133 | "EventLog/EventLog.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 134 | "FrameTracker.cpp", |
| 135 | "GpuService.cpp", |
| 136 | "Layer.cpp", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 137 | "LayerBE.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 138 | "LayerProtoHelper.cpp", |
| 139 | "LayerRejecter.cpp", |
Yiwei Zhang | 7124ad3 | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 140 | "LayerStats.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 141 | "LayerVector.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 142 | "MonitoredProducer.cpp", |
Lloyd Pique | 2209836 | 2018-09-13 11:46:49 -0700 | [diff] [blame] | 143 | "NativeWindowSurface.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 144 | "RenderArea.cpp", |
Ana Krulec | fefcb58 | 2018-08-07 14:22:37 -0700 | [diff] [blame] | 145 | "Scheduler/DispSync.cpp", |
Ana Krulec | 241cf83 | 2018-08-10 15:03:23 -0700 | [diff] [blame] | 146 | "Scheduler/DispSyncSource.cpp", |
Ana Krulec | fefcb58 | 2018-08-07 14:22:37 -0700 | [diff] [blame] | 147 | "Scheduler/EventControlThread.cpp", |
| 148 | "Scheduler/EventThread.cpp", |
| 149 | "Scheduler/MessageQueue.cpp", |
Ana Krulec | 98b5b24 | 2018-08-10 15:03:23 -0700 | [diff] [blame] | 150 | "Scheduler/Scheduler.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 151 | "StartPropertySetThread.cpp", |
| 152 | "SurfaceFlinger.cpp", |
| 153 | "SurfaceInterceptor.cpp", |
| 154 | "SurfaceTracing.cpp", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 155 | "TimeStats/TimeStats.cpp", |
Marissa Wall | e2ffb42 | 2018-10-12 11:33:52 -0700 | [diff] [blame^] | 156 | "TransactionCompletedThread.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 157 | ], |
| 158 | } |
| 159 | |
| 160 | cc_library_shared { |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 161 | // Please use libsurfaceflinger_defaults to configure how the sources are |
| 162 | // built, so the same settings can be used elsewhere. |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 163 | name: "libsurfaceflinger", |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 164 | defaults: ["libsurfaceflinger_production_defaults"], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 165 | srcs: [ |
| 166 | ":libsurfaceflinger_sources", |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 167 | |
| 168 | // Note: SurfaceFlingerFactory is not in the default sources so that it |
| 169 | // can be easily replaced. |
| 170 | "SurfaceFlingerFactory.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 171 | ], |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 172 | logtags: ["EventLog/EventLogTags.logtags"], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 173 | } |
| 174 | |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 175 | cc_defaults { |
| 176 | name: "libsurfaceflinger_binary", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 177 | defaults: ["surfaceflinger_defaults"], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 178 | whole_static_libs: [ |
| 179 | "libsigchain", |
| 180 | ], |
| 181 | shared_libs: [ |
| 182 | "android.frameworks.displayservice@1.0", |
| 183 | "android.hardware.configstore-utils", |
| 184 | "android.hardware.configstore@1.0", |
Peiyong Lin | 13effd1 | 2018-07-24 17:01:47 -0700 | [diff] [blame] | 185 | "android.hardware.configstore@1.2", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 186 | "android.hardware.graphics.allocator@2.0", |
| 187 | "libbinder", |
| 188 | "libcutils", |
| 189 | "libdisplayservicehidl", |
| 190 | "libhidlbase", |
| 191 | "libhidltransport", |
| 192 | "liblayers_proto", |
| 193 | "liblog", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 194 | "libtimestats_proto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 195 | "libutils", |
| 196 | ], |
| 197 | static_libs: [ |
| 198 | "libserviceutils", |
| 199 | "libtrace_proto", |
| 200 | ], |
| 201 | ldflags: ["-Wl,--export-dynamic"], |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 202 | } |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 203 | |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 204 | filegroup { |
| 205 | name: "surfaceflinger_binary_sources", |
| 206 | srcs: ["main_surfaceflinger.cpp"], |
| 207 | } |
| 208 | |
| 209 | cc_binary { |
| 210 | name: "surfaceflinger", |
| 211 | defaults: ["libsurfaceflinger_binary"], |
| 212 | init_rc: ["surfaceflinger.rc"], |
| 213 | srcs: [":surfaceflinger_binary_sources"], |
| 214 | shared_libs: ["libsurfaceflinger"], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | cc_library_shared { |
| 218 | name: "libsurfaceflinger_ddmconnection", |
| 219 | defaults: ["surfaceflinger_defaults"], |
| 220 | srcs: ["DdmConnection.cpp"], |
| 221 | shared_libs: [ |
| 222 | "libcutils", |
| 223 | "libdl", |
| 224 | "liblog", |
| 225 | ], |
| 226 | product_variables: { |
| 227 | // uses jni which may not be available in PDK |
| 228 | pdk: { |
| 229 | enabled: false, |
| 230 | }, |
| 231 | }, |
| 232 | } |
| 233 | |
| 234 | subdirs = [ |
| 235 | "layerproto", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 236 | "TimeStats/timestatsproto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 237 | "tests", |
| 238 | ] |