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