blob: 9aa4e85e2f03fd1cb9c171374467b24b312108a6 [file] [log] [blame]
Lloyd Pique66ce40d2018-01-23 16:42:19 -08001cc_defaults {
2 name: "surfaceflinger_defaults",
3 cflags: [
Lloyd Pique66ce40d2018-01-23 16:42:19 -08004 "-Wall",
5 "-Werror",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -07006 "-Wformat",
Lloyd Pique755e3192018-01-31 16:46:15 -08007 "-Wthread-safety",
Lloyd Pique66ce40d2018-01-23 16:42:19 -08008 "-Wunused",
9 "-Wunreachable-code",
10 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080011}
12
13cc_defaults {
14 name: "libsurfaceflinger_defaults",
15 defaults: ["surfaceflinger_defaults"],
16 cflags: [
Lloyd Pique70d91362018-10-18 16:02:55 -070017 "-DLOG_TAG=\"SurfaceFlinger\"",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080018 "-DGL_GLEXT_PROTOTYPES",
19 "-DEGL_EGLEXT_PROTOTYPES",
20 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080021 shared_libs: [
22 "android.frameworks.vr.composer@1.0",
23 "android.hardware.configstore-utils",
24 "android.hardware.configstore@1.0",
Iris Chang7501ed62018-04-30 14:45:42 +080025 "android.hardware.configstore@1.1",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080026 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080027 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070028 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080029 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070030 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070031 "android.hardware.graphics.composer@2.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080032 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010033 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080034 "libbase",
35 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080036 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080037 "libcutils",
38 "libdl",
39 "libEGL",
40 "libfmq",
41 "libGLESv1_CM",
42 "libGLESv2",
43 "libgui",
44 "libhardware",
45 "libhidlbase",
46 "libhidltransport",
47 "libhwbinder",
48 "liblayers_proto",
49 "liblog",
Inseob Kimd6e835b2019-02-14 12:33:30 +090050 "libnativewindow",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080051 "libpdx_default_transport",
Suren Baghdasaryancd829052018-11-02 19:15:37 -070052 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080053 "libprotobuf-cpp-lite",
54 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070055 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080056 "libui",
Robert Carr720e5062018-07-30 17:45:14 -070057 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080058 "libutils",
Inseob Kimd6e835b2019-02-14 12:33:30 +090059 "libSurfaceFlingerProp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080060 ],
61 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070062 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070063 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080064 "libserviceutils",
65 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080066 "libvr_manager",
67 "libvrflinger",
68 ],
69 header_libs: [
70 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070071 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070072 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080073 ],
74 export_static_lib_headers: [
Lloyd Pique70d91362018-10-18 16:02:55 -070075 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070076 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080077 "libserviceutils",
78 ],
79 export_shared_lib_headers: [
80 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080081 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070082 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080083 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070084 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070085 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010086 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080087 "libhidlbase",
88 "libhidltransport",
89 "libhwbinder",
90 ],
91}
92
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070093cc_defaults {
94 name: "libsurfaceflinger_production_defaults",
95 defaults: ["libsurfaceflinger_defaults"],
96 cflags: [
97 "-fvisibility=hidden",
98 "-fwhole-program-vtables", // requires ThinLTO
99 ],
100 lto: {
101 thin: true,
102 },
Mitch Phillipsc2049af2019-05-14 13:08:29 -0700103 // TODO(b/131771163): Fix broken fuzzer support with LTO.
104 sanitize: {
105 fuzzer: false,
106 },
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700107}
108
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800109cc_library_headers {
110 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800111 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800112 static_libs: ["libserviceutils"],
113 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800114}
Kalle Raitaa099a242017-01-11 11:17:29 -0800115
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800116filegroup {
117 name: "libsurfaceflinger_sources",
118 srcs: [
119 "BufferLayer.cpp",
120 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700121 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700122 "BufferStateLayer.cpp",
Marissa Wall947d34e2019-03-29 14:03:53 -0700123 "ClientCache.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800124 "Client.cpp",
125 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800126 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800127 "DisplayDevice.cpp",
128 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700129 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800130 "DisplayHardware/FramebufferSurface.cpp",
131 "DisplayHardware/HWC2.cpp",
132 "DisplayHardware/HWComposer.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100133 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800134 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800136 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800137 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800138 "Layer.cpp",
139 "LayerProtoHelper.cpp",
140 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800141 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800142 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800143 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700144 "NativeWindowSurface.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700145 "RefreshRateOverlay.cpp",
Dan Stozaec460082018-12-17 15:35:09 -0800146 "RegionSamplingThread.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700147 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700148 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700149 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700150 "Scheduler/EventControlThread.cpp",
151 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100152 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100153 "Scheduler/LayerHistory.cpp",
Ady Abraham09bd3922019-04-08 10:44:56 -0700154 "Scheduler/LayerInfo.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700155 "Scheduler/MessageQueue.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700156 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100157 "Scheduler/SchedulerUtils.cpp",
Ana Krulec757f63a2019-01-25 10:46:18 -0800158 "Scheduler/PhaseOffsets.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800159 "StartPropertySetThread.cpp",
160 "SurfaceFlinger.cpp",
161 "SurfaceInterceptor.cpp",
162 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700163 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700164 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800165 ],
166}
167
168cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700169 // Please use libsurfaceflinger_defaults to configure how the sources are
170 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800171 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700172 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800173 srcs: [
174 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700175
176 // Note: SurfaceFlingerFactory is not in the default sources so that it
177 // can be easily replaced.
178 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800179 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800180 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800181}
182
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700183cc_defaults {
184 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800185 defaults: ["surfaceflinger_defaults"],
Lloyd Pique70d91362018-10-18 16:02:55 -0700186 cflags: [
187 "-DLOG_TAG=\"SurfaceFlinger\"",
188 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800189 whole_static_libs: [
190 "libsigchain",
191 ],
192 shared_libs: [
193 "android.frameworks.displayservice@1.0",
194 "android.hardware.configstore-utils",
195 "android.hardware.configstore@1.0",
196 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800197 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800198 "libbinder",
199 "libcutils",
200 "libdisplayservicehidl",
201 "libhidlbase",
202 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700203 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800204 "liblayers_proto",
205 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700206 "libprocessgroup",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800207 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700208 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800209 "libutils",
210 ],
211 static_libs: [
212 "libserviceutils",
213 "libtrace_proto",
214 ],
215 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700216}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800217
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700218filegroup {
219 name: "surfaceflinger_binary_sources",
220 srcs: ["main_surfaceflinger.cpp"],
221}
222
223cc_binary {
224 name: "surfaceflinger",
225 defaults: ["libsurfaceflinger_binary"],
226 init_rc: ["surfaceflinger.rc"],
227 srcs: [":surfaceflinger_binary_sources"],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900228 shared_libs: [
229 "libsurfaceflinger",
Inseob Kimd6e835b2019-02-14 12:33:30 +0900230 "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900231 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800232}
233
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800234subdirs = [
235 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700236 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800237 "tests",
238]
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900239
240cc_library_shared {
Inseob Kimd6e835b2019-02-14 12:33:30 +0900241 name: "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900242 srcs: [
243 "SurfaceFlingerProperties.cpp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900244 ],
245 shared_libs: [
246 "android.hardware.configstore-utils",
247 "android.hardware.configstore@1.0",
248 "android.hardware.configstore@1.1",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900249 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900250 "libhidlbase",
251 "libhidltransport",
252 "libhwbinder",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900253 "libui",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900254 "libutils",
Inseob Kimd6e835b2019-02-14 12:33:30 +0900255 "liblog",
256 ],
257 static_libs: [
258 "SurfaceFlingerProperties",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900259 ],
260 export_shared_lib_headers: [
Sundong Ahncb20cca2019-02-22 11:57:38 +0900261 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900262 "libhidlbase",
263 "libhidltransport",
264 "libhwbinder",
265 ],
Inseob Kimd6e835b2019-02-14 12:33:30 +0900266 export_static_lib_headers: [
267 "SurfaceFlingerProperties",
268 ],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900269}