blob: b37d543af89efb16ea468bd5d16b46839774c6fb [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",
Peiyong Lin13effd12018-07-24 17:01:47 -070026 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080027 "android.hardware.graphics.allocator@2.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",
Valerie Haue9e843a2018-12-18 13:39:23 -080050 "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",
Ady Abraham8164d482019-01-11 14:47:59 -080059 "libutilscallstack",
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",
Valerie Hau9758ae02018-10-09 16:05:09 -070081 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080082 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070083 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070084 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010085 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080086 "libhidlbase",
87 "libhidltransport",
88 "libhwbinder",
89 ],
90}
91
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070092cc_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 Pique66ce40d2018-01-23 16:42:19 -0800104cc_library_headers {
105 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800106 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800107 static_libs: ["libserviceutils"],
108 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800109}
Kalle Raitaa099a242017-01-11 11:17:29 -0800110
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800111filegroup {
112 name: "libsurfaceflinger_sources",
113 srcs: [
114 "BufferLayer.cpp",
115 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700116 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700117 "BufferStateLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800118 "Client.cpp",
119 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800120 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800121 "DisplayDevice.cpp",
122 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700123 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800124 "DisplayHardware/FramebufferSurface.cpp",
125 "DisplayHardware/HWC2.cpp",
126 "DisplayHardware/HWComposer.cpp",
127 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100128 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800129 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800130 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800131 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800132 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700134 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800141 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700142 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700143 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700144 "Scheduler/EventControlThread.cpp",
145 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100146 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100147 "Scheduler/LayerHistory.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700148 "Scheduler/MessageQueue.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700149 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100150 "Scheduler/SchedulerUtils.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800151 "StartPropertySetThread.cpp",
152 "SurfaceFlinger.cpp",
153 "SurfaceInterceptor.cpp",
154 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700155 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700156 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800157 ],
158}
159
160cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700161 // Please use libsurfaceflinger_defaults to configure how the sources are
162 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800163 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700164 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800165 srcs: [
166 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700167
168 // Note: SurfaceFlingerFactory is not in the default sources so that it
169 // can be easily replaced.
170 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800171 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800172 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800173}
174
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700175cc_defaults {
176 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800177 defaults: ["surfaceflinger_defaults"],
Lloyd Pique70d91362018-10-18 16:02:55 -0700178 cflags: [
179 "-DLOG_TAG=\"SurfaceFlinger\"",
180 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800181 whole_static_libs: [
182 "libsigchain",
183 ],
184 shared_libs: [
185 "android.frameworks.displayservice@1.0",
186 "android.hardware.configstore-utils",
187 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700188 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800189 "android.hardware.graphics.allocator@2.0",
190 "libbinder",
191 "libcutils",
192 "libdisplayservicehidl",
193 "libhidlbase",
194 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700195 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800196 "liblayers_proto",
197 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700198 "libprocessgroup",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800199 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700200 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800201 "libutils",
202 ],
203 static_libs: [
204 "libserviceutils",
205 "libtrace_proto",
206 ],
207 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700208}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800209
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700210filegroup {
211 name: "surfaceflinger_binary_sources",
212 srcs: ["main_surfaceflinger.cpp"],
213}
214
215cc_binary {
216 name: "surfaceflinger",
217 defaults: ["libsurfaceflinger_binary"],
218 init_rc: ["surfaceflinger.rc"],
219 srcs: [":surfaceflinger_binary_sources"],
220 shared_libs: ["libsurfaceflinger"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800221}
222
223cc_library_shared {
224 name: "libsurfaceflinger_ddmconnection",
225 defaults: ["surfaceflinger_defaults"],
226 srcs: ["DdmConnection.cpp"],
227 shared_libs: [
228 "libcutils",
229 "libdl",
230 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700231 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800232 ],
233 product_variables: {
234 // uses jni which may not be available in PDK
235 pdk: {
236 enabled: false,
237 },
238 },
239}
240
241subdirs = [
242 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700243 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800244 "tests",
245]