blob: 5b3bbca49f45521fcfcc73f830f929adc00ea70b [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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080052 "libprotobuf-cpp-lite",
53 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070054 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080055 "libui",
Robert Carr720e5062018-07-30 17:45:14 -070056 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080057 "libutils",
Ady Abraham8164d482019-01-11 14:47:59 -080058 "libutilscallstack",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080059 ],
60 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070061 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070062 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080063 "libserviceutils",
64 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080065 "libvr_manager",
66 "libvrflinger",
67 ],
68 header_libs: [
69 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070070 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070071 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080072 ],
73 export_static_lib_headers: [
Lloyd Pique70d91362018-10-18 16:02:55 -070074 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070075 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080076 "libserviceutils",
77 ],
78 export_shared_lib_headers: [
79 "android.hardware.graphics.allocator@2.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",
86 "libhidltransport",
87 "libhwbinder",
88 ],
89}
90
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070091cc_defaults {
92 name: "libsurfaceflinger_production_defaults",
93 defaults: ["libsurfaceflinger_defaults"],
94 cflags: [
95 "-fvisibility=hidden",
96 "-fwhole-program-vtables", // requires ThinLTO
97 ],
98 lto: {
99 thin: true,
100 },
101}
102
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800103cc_library_headers {
104 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800105 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800106 static_libs: ["libserviceutils"],
107 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800108}
Kalle Raitaa099a242017-01-11 11:17:29 -0800109
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800110filegroup {
111 name: "libsurfaceflinger_sources",
112 srcs: [
113 "BufferLayer.cpp",
114 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700115 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700116 "BufferStateLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800117 "Client.cpp",
118 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800119 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800120 "DisplayDevice.cpp",
121 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700122 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800123 "DisplayHardware/FramebufferSurface.cpp",
124 "DisplayHardware/HWC2.cpp",
125 "DisplayHardware/HWComposer.cpp",
126 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100127 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800128 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800129 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800130 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800131 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800132 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700133 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800134 "LayerProtoHelper.cpp",
135 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800136 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800137 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800138 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700139 "NativeWindowSurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800140 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700141 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700142 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700143 "Scheduler/EventControlThread.cpp",
144 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100145 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100146 "Scheduler/LayerHistory.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700147 "Scheduler/MessageQueue.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700148 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100149 "Scheduler/SchedulerUtils.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800150 "StartPropertySetThread.cpp",
151 "SurfaceFlinger.cpp",
152 "SurfaceInterceptor.cpp",
153 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700154 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700155 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800156 ],
157}
158
159cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700160 // Please use libsurfaceflinger_defaults to configure how the sources are
161 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800162 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700163 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800164 srcs: [
165 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700166
167 // Note: SurfaceFlingerFactory is not in the default sources so that it
168 // can be easily replaced.
169 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800170 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800171 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800172}
173
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700174cc_defaults {
175 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800176 defaults: ["surfaceflinger_defaults"],
Lloyd Pique70d91362018-10-18 16:02:55 -0700177 cflags: [
178 "-DLOG_TAG=\"SurfaceFlinger\"",
179 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800180 whole_static_libs: [
181 "libsigchain",
182 ],
183 shared_libs: [
184 "android.frameworks.displayservice@1.0",
185 "android.hardware.configstore-utils",
186 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700187 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800188 "android.hardware.graphics.allocator@2.0",
189 "libbinder",
190 "libcutils",
191 "libdisplayservicehidl",
192 "libhidlbase",
193 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700194 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800195 "liblayers_proto",
196 "liblog",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800197 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700198 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800199 "libutils",
200 ],
201 static_libs: [
202 "libserviceutils",
203 "libtrace_proto",
204 ],
205 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700206}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800207
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700208filegroup {
209 name: "surfaceflinger_binary_sources",
210 srcs: ["main_surfaceflinger.cpp"],
211}
212
213cc_binary {
214 name: "surfaceflinger",
215 defaults: ["libsurfaceflinger_binary"],
216 init_rc: ["surfaceflinger.rc"],
217 srcs: [":surfaceflinger_binary_sources"],
218 shared_libs: ["libsurfaceflinger"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800219}
220
221cc_library_shared {
222 name: "libsurfaceflinger_ddmconnection",
223 defaults: ["surfaceflinger_defaults"],
224 srcs: ["DdmConnection.cpp"],
225 shared_libs: [
226 "libcutils",
227 "libdl",
228 "liblog",
229 ],
230 product_variables: {
231 // uses jni which may not be available in PDK
232 pdk: {
233 enabled: false,
234 },
235 },
236}
237
238subdirs = [
239 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700240 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800241 "tests",
242]