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