blob: ee69b8326e92d09380b787c05a5c5509147cf08f [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",
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",
28 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070029 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070030 "android.hardware.graphics.composer@2.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080031 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010032 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080033 "libbase",
34 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080035 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080036 "libcutils",
37 "libdl",
38 "libEGL",
39 "libfmq",
40 "libGLESv1_CM",
41 "libGLESv2",
42 "libgui",
43 "libhardware",
44 "libhidlbase",
45 "libhidltransport",
46 "libhwbinder",
47 "liblayers_proto",
48 "liblog",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080049 "libpdx_default_transport",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080050 "libprotobuf-cpp-lite",
51 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070052 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080053 "libui",
54 "libutils",
55 "libvulkan",
56 ],
57 static_libs: [
58 "libserviceutils",
59 "libtrace_proto",
60 "libvkjson",
61 "libvr_manager",
62 "libvrflinger",
63 ],
64 header_libs: [
65 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070066 "android.hardware.graphics.composer@2.2-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080067 ],
68 export_static_lib_headers: [
69 "libserviceutils",
70 ],
71 export_shared_lib_headers: [
72 "android.hardware.graphics.allocator@2.0",
73 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070074 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070075 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010076 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080077 "libhidlbase",
78 "libhidltransport",
79 "libhwbinder",
80 ],
81}
82
83cc_library_headers {
84 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -080085 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +080086 static_libs: ["libserviceutils"],
87 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -080088}
Kalle Raitaa099a242017-01-11 11:17:29 -080089
Lloyd Pique66ce40d2018-01-23 16:42:19 -080090filegroup {
91 name: "libsurfaceflinger_sources",
92 srcs: [
93 "BufferLayer.cpp",
94 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -070095 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -070096 "BufferStateLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080097 "Client.cpp",
98 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -080099 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800100 "DisplayDevice.cpp",
101 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700102 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800103 "DisplayHardware/FramebufferSurface.cpp",
104 "DisplayHardware/HWC2.cpp",
105 "DisplayHardware/HWComposer.cpp",
106 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100107 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800108 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800109 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800110 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800111 "FrameTracker.cpp",
112 "GpuService.cpp",
113 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700114 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800115 "LayerProtoHelper.cpp",
116 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800117 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800118 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800119 "MonitoredProducer.cpp",
120 "RenderArea.cpp",
121 "RenderEngine/Description.cpp",
122 "RenderEngine/GLES20RenderEngine.cpp",
123 "RenderEngine/GLExtensions.cpp",
124 "RenderEngine/Image.cpp",
125 "RenderEngine/Mesh.cpp",
126 "RenderEngine/Program.cpp",
127 "RenderEngine/ProgramCache.cpp",
128 "RenderEngine/RenderEngine.cpp",
129 "RenderEngine/Surface.cpp",
130 "RenderEngine/Texture.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700131 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700132 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700133 "Scheduler/EventControlThread.cpp",
134 "Scheduler/EventThread.cpp",
135 "Scheduler/MessageQueue.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800136 "StartPropertySetThread.cpp",
137 "SurfaceFlinger.cpp",
138 "SurfaceInterceptor.cpp",
139 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700140 "TimeStats/TimeStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800141 ],
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",
Peiyong Lin13effd12018-07-24 17:01:47 -0700179 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800180 "android.hardware.graphics.allocator@2.0",
181 "libbinder",
182 "libcutils",
183 "libdisplayservicehidl",
184 "libhidlbase",
185 "libhidltransport",
186 "liblayers_proto",
187 "liblog",
188 "libsurfaceflinger",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700189 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800190 "libutils",
191 ],
192 static_libs: [
193 "libserviceutils",
194 "libtrace_proto",
195 ],
196 ldflags: ["-Wl,--export-dynamic"],
197
198 // TODO(b/71715793): These version-scripts are required due to the use of
199 // whole_static_libs to pull in libsigchain. To work, the files had to be
200 // locally duplicated from their original location
201 // $ANDROID_ROOT/art/sigchainlib/
202 multilib: {
203 lib32: {
204 version_script: "version-script32.txt",
205 },
206 lib64: {
207 version_script: "version-script64.txt",
208 },
209 },
210}
211
212cc_library_shared {
213 name: "libsurfaceflinger_ddmconnection",
214 defaults: ["surfaceflinger_defaults"],
215 srcs: ["DdmConnection.cpp"],
216 shared_libs: [
217 "libcutils",
218 "libdl",
219 "liblog",
220 ],
221 product_variables: {
222 // uses jni which may not be available in PDK
223 pdk: {
224 enabled: false,
225 },
226 },
227}
228
229subdirs = [
230 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700231 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800232 "tests",
233]