blob: fa0141f48b2d7b397cd1bee8a6f8e07950df1cc5 [file] [log] [blame]
Lloyd Pique66ce40d2018-01-23 16:42:19 -08001cc_defaults {
2 name: "surfaceflinger_defaults",
3 cflags: [
4 "-DLOG_TAG=\"SurfaceFlinger\"",
5 "-Wall",
6 "-Werror",
Lloyd Pique755e3192018-01-31 16:46:15 -08007 "-Wthread-safety",
Lloyd Pique66ce40d2018-01-23 16:42:19 -08008 "-Wunused",
9 "-Wunreachable-code",
10 ],
11 cppflags: ["-std=c++1z"],
12}
13
14cc_defaults {
15 name: "libsurfaceflinger_defaults",
16 defaults: ["surfaceflinger_defaults"],
17 cflags: [
18 "-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",
27 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070028 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070029 "android.hardware.graphics.composer@2.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080030 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010031 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080032 "libbase",
33 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080034 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080035 "libcutils",
36 "libdl",
37 "libEGL",
38 "libfmq",
39 "libGLESv1_CM",
40 "libGLESv2",
41 "libgui",
42 "libhardware",
43 "libhidlbase",
44 "libhidltransport",
45 "libhwbinder",
46 "liblayers_proto",
47 "liblog",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080048 "libpdx_default_transport",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080049 "libprotobuf-cpp-lite",
50 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070051 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080052 "libui",
53 "libutils",
54 "libvulkan",
55 ],
56 static_libs: [
57 "libserviceutils",
58 "libtrace_proto",
59 "libvkjson",
60 "libvr_manager",
61 "libvrflinger",
62 ],
63 header_libs: [
64 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070065 "android.hardware.graphics.composer@2.2-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080066 ],
67 export_static_lib_headers: [
68 "libserviceutils",
69 ],
70 export_shared_lib_headers: [
71 "android.hardware.graphics.allocator@2.0",
72 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070073 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070074 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010075 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080076 "libhidlbase",
77 "libhidltransport",
78 "libhwbinder",
79 ],
80}
81
82cc_library_headers {
83 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -080084 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +080085 static_libs: ["libserviceutils"],
86 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -080087}
Kalle Raitaa099a242017-01-11 11:17:29 -080088
Lloyd Pique66ce40d2018-01-23 16:42:19 -080089filegroup {
90 name: "libsurfaceflinger_sources",
91 srcs: [
92 "BufferLayer.cpp",
93 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -070094 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -070095 "BufferStateLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080096 "Client.cpp",
97 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -080098 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080099 "DisplayDevice.cpp",
100 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700101 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800102 "DisplayHardware/FramebufferSurface.cpp",
103 "DisplayHardware/HWC2.cpp",
104 "DisplayHardware/HWComposer.cpp",
105 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100106 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800107 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800108 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800109 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800110 "FrameTracker.cpp",
111 "GpuService.cpp",
112 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700113 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800114 "LayerProtoHelper.cpp",
115 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800116 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800117 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800118 "MonitoredProducer.cpp",
119 "RenderArea.cpp",
120 "RenderEngine/Description.cpp",
121 "RenderEngine/GLES20RenderEngine.cpp",
122 "RenderEngine/GLExtensions.cpp",
123 "RenderEngine/Image.cpp",
124 "RenderEngine/Mesh.cpp",
125 "RenderEngine/Program.cpp",
126 "RenderEngine/ProgramCache.cpp",
127 "RenderEngine/RenderEngine.cpp",
128 "RenderEngine/Surface.cpp",
129 "RenderEngine/Texture.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700130 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700131 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700132 "Scheduler/EventControlThread.cpp",
133 "Scheduler/EventThread.cpp",
134 "Scheduler/MessageQueue.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "StartPropertySetThread.cpp",
136 "SurfaceFlinger.cpp",
137 "SurfaceInterceptor.cpp",
138 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700139 "TimeStats/TimeStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800140 "Transform.cpp",
141 ],
142}
143
144cc_library_shared {
145 name: "libsurfaceflinger",
146 defaults: ["libsurfaceflinger_defaults"],
147 cflags: [
148 "-fvisibility=hidden",
149 "-Werror=format",
150 ],
151 srcs: [
152 ":libsurfaceflinger_sources",
153 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800154 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800155 include_dirs: [
Yiwei Zhang66e01752018-04-24 14:16:09 -0700156 "frameworks/native/vulkan/vkjson",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800157 "frameworks/native/vulkan/include",
158 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800159 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800160 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800161 ],
162 lto: {
163 thin: true,
164 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800165}
166
167cc_binary {
168 name: "surfaceflinger",
169 defaults: ["surfaceflinger_defaults"],
170 init_rc: ["surfaceflinger.rc"],
171 srcs: ["main_surfaceflinger.cpp"],
172 whole_static_libs: [
173 "libsigchain",
174 ],
175 shared_libs: [
176 "android.frameworks.displayservice@1.0",
177 "android.hardware.configstore-utils",
178 "android.hardware.configstore@1.0",
179 "android.hardware.graphics.allocator@2.0",
180 "libbinder",
181 "libcutils",
182 "libdisplayservicehidl",
183 "libhidlbase",
184 "libhidltransport",
185 "liblayers_proto",
186 "liblog",
187 "libsurfaceflinger",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700188 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800189 "libutils",
190 ],
191 static_libs: [
192 "libserviceutils",
193 "libtrace_proto",
194 ],
195 ldflags: ["-Wl,--export-dynamic"],
196
197 // TODO(b/71715793): These version-scripts are required due to the use of
198 // whole_static_libs to pull in libsigchain. To work, the files had to be
199 // locally duplicated from their original location
200 // $ANDROID_ROOT/art/sigchainlib/
201 multilib: {
202 lib32: {
203 version_script: "version-script32.txt",
204 },
205 lib64: {
206 version_script: "version-script64.txt",
207 },
208 },
209}
210
211cc_library_shared {
212 name: "libsurfaceflinger_ddmconnection",
213 defaults: ["surfaceflinger_defaults"],
214 srcs: ["DdmConnection.cpp"],
215 shared_libs: [
216 "libcutils",
217 "libdl",
218 "liblog",
219 ],
220 product_variables: {
221 // uses jni which may not be available in PDK
222 pdk: {
223 enabled: false,
224 },
225 },
226}
227
228subdirs = [
229 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700230 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800231 "tests",
232]