blob: 0be1fd7d935ec0a2f06f89523c784d80d023c88b [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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080095 "Client.cpp",
96 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -080097 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080098 "DisplayDevice.cpp",
99 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700100 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800101 "DisplayHardware/FramebufferSurface.cpp",
102 "DisplayHardware/HWC2.cpp",
103 "DisplayHardware/HWComposer.cpp",
104 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100105 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800106 "DisplayHardware/VirtualDisplaySurface.cpp",
107 "DispSync.cpp",
108 "Effects/Daltonizer.cpp",
109 "EventControlThread.cpp",
110 "EventLog/EventLog.cpp",
111 "EventThread.cpp",
112 "FrameTracker.cpp",
113 "GpuService.cpp",
114 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700115 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800116 "LayerProtoHelper.cpp",
117 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800118 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800119 "LayerVector.cpp",
120 "MessageQueue.cpp",
121 "MonitoredProducer.cpp",
122 "RenderArea.cpp",
123 "RenderEngine/Description.cpp",
124 "RenderEngine/GLES20RenderEngine.cpp",
125 "RenderEngine/GLExtensions.cpp",
126 "RenderEngine/Image.cpp",
127 "RenderEngine/Mesh.cpp",
128 "RenderEngine/Program.cpp",
129 "RenderEngine/ProgramCache.cpp",
130 "RenderEngine/RenderEngine.cpp",
131 "RenderEngine/Surface.cpp",
132 "RenderEngine/Texture.cpp",
133 "StartPropertySetThread.cpp",
134 "SurfaceFlinger.cpp",
135 "SurfaceInterceptor.cpp",
136 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700137 "TimeStats/TimeStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800138 "Transform.cpp",
139 ],
140}
141
142cc_library_shared {
143 name: "libsurfaceflinger",
144 defaults: ["libsurfaceflinger_defaults"],
145 cflags: [
146 "-fvisibility=hidden",
147 "-Werror=format",
148 ],
149 srcs: [
150 ":libsurfaceflinger_sources",
151 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800152 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800153 include_dirs: [
Yiwei Zhang66e01752018-04-24 14:16:09 -0700154 "frameworks/native/vulkan/vkjson",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800155 "frameworks/native/vulkan/include",
156 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800157 cppflags: [
Logan Chien3ac6c962018-02-27 16:46:00 +0800158 "-fwhole-program-vtables", // requires ThinLTO
Lloyd Piquef58625d2017-12-19 13:22:33 -0800159 ],
160 lto: {
161 thin: true,
162 },
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800163}
164
165cc_binary {
166 name: "surfaceflinger",
167 defaults: ["surfaceflinger_defaults"],
168 init_rc: ["surfaceflinger.rc"],
169 srcs: ["main_surfaceflinger.cpp"],
170 whole_static_libs: [
171 "libsigchain",
172 ],
173 shared_libs: [
174 "android.frameworks.displayservice@1.0",
175 "android.hardware.configstore-utils",
176 "android.hardware.configstore@1.0",
177 "android.hardware.graphics.allocator@2.0",
178 "libbinder",
179 "libcutils",
180 "libdisplayservicehidl",
181 "libhidlbase",
182 "libhidltransport",
183 "liblayers_proto",
184 "liblog",
185 "libsurfaceflinger",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700186 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800187 "libutils",
188 ],
189 static_libs: [
190 "libserviceutils",
191 "libtrace_proto",
192 ],
193 ldflags: ["-Wl,--export-dynamic"],
194
195 // TODO(b/71715793): These version-scripts are required due to the use of
196 // whole_static_libs to pull in libsigchain. To work, the files had to be
197 // locally duplicated from their original location
198 // $ANDROID_ROOT/art/sigchainlib/
199 multilib: {
200 lib32: {
201 version_script: "version-script32.txt",
202 },
203 lib64: {
204 version_script: "version-script64.txt",
205 },
206 },
207}
208
209cc_library_shared {
210 name: "libsurfaceflinger_ddmconnection",
211 defaults: ["surfaceflinger_defaults"],
212 srcs: ["DdmConnection.cpp"],
213 shared_libs: [
214 "libcutils",
215 "libdl",
216 "liblog",
217 ],
218 product_variables: {
219 // uses jni which may not be available in PDK
220 pdk: {
221 enabled: false,
222 },
223 },
224}
225
226subdirs = [
227 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700228 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800229 "tests",
230]