blob: cda982ac235ce32bddba4118fec346e25193252c [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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080046 "liblayers_proto",
47 "liblog",
Inseob Kimd6e835b2019-02-14 12:33:30 +090048 "libnativewindow",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080049 "libpdx_default_transport",
Suren Baghdasaryancd829052018-11-02 19:15:37 -070050 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080051 "libprotobuf-cpp-lite",
52 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070053 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080054 "libui",
Robert Carr720e5062018-07-30 17:45:14 -070055 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080056 "libutils",
Inseob Kimd6e835b2019-02-14 12:33:30 +090057 "libSurfaceFlingerProp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080058 ],
59 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070060 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070061 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080062 "libserviceutils",
63 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080064 "libvr_manager",
65 "libvrflinger",
66 ],
67 header_libs: [
68 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070069 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070070 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080071 ],
72 export_static_lib_headers: [
Lloyd Pique70d91362018-10-18 16:02:55 -070073 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070074 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080075 "libserviceutils",
76 ],
77 export_shared_lib_headers: [
78 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080079 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070080 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080081 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070082 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070083 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010084 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080085 "libhidlbase",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080086 ],
87}
88
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070089cc_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 },
Mitch Phillipsc2049af2019-05-14 13:08:29 -070099 // TODO(b/131771163): Fix broken fuzzer support with LTO.
100 sanitize: {
101 fuzzer: false,
102 },
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700103}
104
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800105cc_library_headers {
106 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800107 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800108 static_libs: ["libserviceutils"],
109 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800110}
Kalle Raitaa099a242017-01-11 11:17:29 -0800111
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800112filegroup {
113 name: "libsurfaceflinger_sources",
114 srcs: [
115 "BufferLayer.cpp",
116 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700117 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700118 "BufferStateLayer.cpp",
Marissa Wall947d34e2019-03-29 14:03:53 -0700119 "ClientCache.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800120 "Client.cpp",
121 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800122 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800123 "DisplayDevice.cpp",
124 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700125 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800126 "DisplayHardware/FramebufferSurface.cpp",
127 "DisplayHardware/HWC2.cpp",
128 "DisplayHardware/HWComposer.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100129 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800130 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800131 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800132 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800134 "Layer.cpp",
135 "LayerProtoHelper.cpp",
136 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800137 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800138 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800139 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700140 "NativeWindowSurface.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700141 "RefreshRateOverlay.cpp",
Dan Stozaec460082018-12-17 15:35:09 -0800142 "RegionSamplingThread.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700143 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700144 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700145 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700146 "Scheduler/EventControlThread.cpp",
147 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100148 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100149 "Scheduler/LayerHistory.cpp",
Ady Abraham09bd3922019-04-08 10:44:56 -0700150 "Scheduler/LayerInfo.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700151 "Scheduler/MessageQueue.cpp",
Alec Mourib488afa2019-05-23 10:22:24 -0700152 "Scheduler/PhaseOffsets.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700153 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100154 "Scheduler/SchedulerUtils.cpp",
Alec Mourib488afa2019-05-23 10:22:24 -0700155 "Scheduler/VSyncModulator.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800156 "StartPropertySetThread.cpp",
157 "SurfaceFlinger.cpp",
158 "SurfaceInterceptor.cpp",
159 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700160 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700161 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800162 ],
163}
164
165cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700166 // Please use libsurfaceflinger_defaults to configure how the sources are
167 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800168 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700169 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800170 srcs: [
171 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700172
173 // Note: SurfaceFlingerFactory is not in the default sources so that it
174 // can be easily replaced.
175 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800176 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800177 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800178}
179
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700180cc_defaults {
181 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800182 defaults: ["surfaceflinger_defaults"],
Lloyd Pique70d91362018-10-18 16:02:55 -0700183 cflags: [
184 "-DLOG_TAG=\"SurfaceFlinger\"",
185 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800186 shared_libs: [
187 "android.frameworks.displayservice@1.0",
188 "android.hardware.configstore-utils",
189 "android.hardware.configstore@1.0",
190 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800191 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800192 "libbinder",
193 "libcutils",
194 "libdisplayservicehidl",
195 "libhidlbase",
Robert Carr720e5062018-07-30 17:45:14 -0700196 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800197 "liblayers_proto",
198 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700199 "libprocessgroup",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800200 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700201 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800202 "libutils",
203 ],
204 static_libs: [
205 "libserviceutils",
206 "libtrace_proto",
207 ],
208 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700209}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800210
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700211filegroup {
212 name: "surfaceflinger_binary_sources",
213 srcs: ["main_surfaceflinger.cpp"],
214}
215
216cc_binary {
217 name: "surfaceflinger",
218 defaults: ["libsurfaceflinger_binary"],
219 init_rc: ["surfaceflinger.rc"],
220 srcs: [":surfaceflinger_binary_sources"],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900221 shared_libs: [
222 "libsurfaceflinger",
Inseob Kimd6e835b2019-02-14 12:33:30 +0900223 "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900224 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800225}
226
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800227subdirs = [
228 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700229 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800230 "tests",
231]
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900232
233cc_library_shared {
Inseob Kimd6e835b2019-02-14 12:33:30 +0900234 name: "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900235 srcs: [
236 "SurfaceFlingerProperties.cpp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900237 ],
238 shared_libs: [
239 "android.hardware.configstore-utils",
240 "android.hardware.configstore@1.0",
241 "android.hardware.configstore@1.1",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900242 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900243 "libhidlbase",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900244 "libui",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900245 "libutils",
Inseob Kimd6e835b2019-02-14 12:33:30 +0900246 "liblog",
247 ],
248 static_libs: [
249 "SurfaceFlingerProperties",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900250 ],
251 export_shared_lib_headers: [
Sundong Ahncb20cca2019-02-22 11:57:38 +0900252 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900253 "libhidlbase",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900254 ],
Inseob Kimd6e835b2019-02-14 12:33:30 +0900255 export_static_lib_headers: [
256 "SurfaceFlingerProperties",
257 ],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900258}